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;