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} ron = {version = "0.7", default-features = false}
serde = {version = "1.0", features = [ "rc", "derive" ]} serde = {version = "1.0", features = [ "rc", "derive" ]}
[target.'cfg(windows)'.dependencies] [target.'cfg(all(windows, target_env="msvc"))'.dependencies]
mimalloc = "0.1.29" mimalloc = "0.1.29"
[dependencies.tui] [dependencies.tui]

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
#[cfg(all(feature = "be-dyn-lib", feature = "use-dyn-lib"))] #[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"); 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] #[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

View File

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