Disable mimalloc for non msvc builds

This commit is contained in:
Isse 2022-07-06 19:08:19 +02:00
parent 58679d9900
commit 7e18384e1c
6 changed files with 6 additions and 5 deletions

View File

@ -43,7 +43,7 @@ tracing = { version = "0.1", default-features = false }
ron = {version = "0.7", default-features = false}
serde = {version = "1.0", features = [ "rc", "derive" ]}
[target.'cfg(windows)'.dependencies]
[target.'cfg(all(windows, target_env="msvc"))'.dependencies]
mimalloc = "0.1.29"
[dependencies.tui]

View File

@ -2,7 +2,7 @@
#![deny(clippy::clone_on_ref_ptr)]
#![feature(bool_to_option)]
#[cfg(target_os = "windows")]
#[cfg(all(target_os = "windows", target_env = "msvc"))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

View File

@ -138,7 +138,7 @@ dispatch = "0.1.4"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[target.'cfg(windows)'.dependencies]
[target.'cfg(all(windows, target_env="msvc"))'.dependencies]
mimalloc = "0.1.29"
# Mumble

View File

@ -21,5 +21,5 @@ voxygen-dynlib = {package = "veloren-voxygen-dynlib", path = "../dynlib", option
# Hot Reloading
lazy_static = {version = "1.4.0", optional = true}
[target.'cfg(windows)'.dependencies]
[target.'cfg(all(windows, target_env="msvc"))'.dependencies]
mimalloc = "0.1.29"

View File

@ -4,7 +4,7 @@
#[cfg(all(feature = "be-dyn-lib", feature = "use-dyn-lib"))]
compile_error!("Can't use both \"be-dyn-lib\" and \"use-dyn-lib\" features at once");
#[cfg(all(target_os = "windows", feature = "be-dyn-lib"))]
#[cfg(all(target_os = "windows", target_env = "msvc", feature = "be-dyn-lib"))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

View File

@ -4,6 +4,7 @@
#[cfg(all(
target_os = "windows",
target_env = "msvc",
not(feature = "tracy-memory"),
not(feature = "hot-egui")
))]