From 66b5142334a8c2aba24366fdd8977e6040be24a4 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 2 May 2019 11:12:33 -0700 Subject: [PATCH] Stop trying to use jemalloc on Windows. Closes #138. --- demo/native/Cargo.toml | 4 +++- demo/native/src/main.rs | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/demo/native/Cargo.toml b/demo/native/Cargo.toml index 37abeda4..5e4468de 100644 --- a/demo/native/Cargo.toml +++ b/demo/native/Cargo.toml @@ -10,7 +10,6 @@ pf-no-simd = ["pathfinder_simd/pf-no-simd"] [dependencies] color-backtrace = "0.1" gl = "0.6" -jemallocator = "0.1" nfd = "0.0.4" pretty_env_logger = "0.3" sdl2 = "0.32" @@ -30,3 +29,6 @@ path = "../../gpu" [dependencies.pathfinder_simd] path = "../../simd" + +[target.'cfg(not(windows))'.dependencies] +jemallocator = "0.1" diff --git a/demo/native/src/main.rs b/demo/native/src/main.rs index a526fe27..d0d97497 100644 --- a/demo/native/src/main.rs +++ b/demo/native/src/main.rs @@ -10,7 +10,6 @@ //! A demo app for Pathfinder using SDL 2. -use jemallocator; use nfd::Response; use pathfinder_demo::window::{Event, Keycode, SVGPath, View, Window, WindowSize}; use pathfinder_demo::{DemoApp, Options}; @@ -26,6 +25,10 @@ use sdl2_sys::{SDL_Event, SDL_UserEvent}; use std::path::PathBuf; use std::ptr; +#[cfg(not(windows))] +use jemallocator; + +#[cfg(not(windows))] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;