Skip to content

Commit b625ad9

Browse files
committed
Disable jemalloc on Windows
Upstream isn't even compile-testing on Windows ( https://github.com/tikv/jemallocator/blob/main/.github/workflows/main.yml ), so we should disable it as well. This should fix the build failing with mingw.
1 parent ea17eee commit b625ad9

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

tools/compiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ proc-macro2 = "1.0.11"
3333
spin_on = { workspace = true }
3434
itertools = { workspace = true }
3535

36-
[target.'cfg(not(target_env = "msvc"))'.dependencies]
36+
[target.'cfg(not(target_os = "windows"))'.dependencies]
3737
tikv-jemallocator = { workspace = true, optional = true }

tools/compiler/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use i_slint_compiler::*;
77
use itertools::Itertools;
88
use std::io::{BufWriter, Write};
99

10-
#[cfg(all(feature = "jemalloc", not(target_env = "msvc")))]
10+
#[cfg(all(feature = "jemalloc", not(target_os = "windows")))]
1111
use tikv_jemallocator::Jemalloc;
1212

13-
#[cfg(all(feature = "jemalloc", not(target_env = "msvc")))]
13+
#[cfg(all(feature = "jemalloc", not(target_os = "windows")))]
1414
#[global_allocator]
1515
static GLOBAL: Jemalloc = Jemalloc;
1616

tools/lsp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ i-slint-core = { workspace = true, features = ["std"], optional = true }
9595
slint = { workspace = true, features = ["compat-1-2"], optional = true }
9696
slint-interpreter = { workspace = true, features = ["compat-1-2", "internal", "internal-highlight", "internal-json", "image-default-formats"], optional = true }
9797

98-
[target.'cfg(not(any(target_env = "msvc", target_arch = "wasm32")))'.dependencies]
98+
[target.'cfg(not(any(target_os = "windows", target_arch = "wasm32")))'.dependencies]
9999
tikv-jemallocator = { workspace = true }
100100

101101
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

tools/lsp/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ use std::task::{Poll, Waker};
4040

4141
use crate::common::document_cache::CompilerConfiguration;
4242

43-
#[cfg(not(any(target_env = "msvc", target_arch = "wasm32")))]
43+
#[cfg(not(any(target_os = "windows", target_arch = "wasm32")))]
4444
use tikv_jemallocator::Jemalloc;
4545

46-
#[cfg(not(any(target_env = "msvc", target_arch = "wasm32")))]
46+
#[cfg(not(any(target_os = "windows", target_arch = "wasm32")))]
4747
#[global_allocator]
4848
static GLOBAL: Jemalloc = Jemalloc;
4949

tools/viewer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ itertools = { workspace = true }
6767
serde_json = { workspace = true }
6868
smol_str = { workspace = true }
6969

70-
[target.'cfg(not(target_env = "msvc"))'.dependencies]
70+
[target.'cfg(not(target_os = "windows"))'.dependencies]
7171
tikv-jemallocator = { workspace = true }
7272

7373
[[bin]]

tools/viewer/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ use std::path::PathBuf;
1515
use std::sync::atomic::{AtomicU32, Ordering};
1616
use std::sync::{Arc, Mutex};
1717

18-
#[cfg(not(target_env = "msvc"))]
18+
#[cfg(not(target_os = "windows"))]
1919
use tikv_jemallocator::Jemalloc;
2020

21-
#[cfg(not(target_env = "msvc"))]
21+
#[cfg(not(target_os = "windows"))]
2222
#[global_allocator]
2323
static GLOBAL: Jemalloc = Jemalloc;
2424

0 commit comments

Comments
 (0)