Skip to content

Commit 584d8b9

Browse files
fix(napi): enable mimalloc no_opt_arch feature on linux aarch64 (#11053)
fixes #11045 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 4e5c73b commit 584d8b9

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

apps/oxlint/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ serde_json = { workspace = true }
4040
tempfile = { workspace = true }
4141
tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature
4242

43-
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_family = "wasm")))'.dependencies]
43+
[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies]
4444
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] }
4545

46-
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
46+
[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
4747
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }
4848

49+
[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies]
50+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] }
51+
4952
[dev-dependencies]
5053
insta = { workspace = true }
5154
lazy-regex = { workspace = true }

napi/minify/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,14 @@ oxc_syntax = { workspace = true }
3333
napi = { workspace = true }
3434
napi-derive = { workspace = true }
3535

36-
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies]
37-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true }
36+
[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies]
37+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] }
3838

39-
[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies]
40-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true }
39+
[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
40+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }
41+
42+
[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies]
43+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] }
4144

4245
[build-dependencies]
4346
napi-build = { workspace = true }

napi/parser/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ rustc-hash = { workspace = true }
3232
napi = { workspace = true, features = ["async"] }
3333
napi-derive = { workspace = true }
3434

35-
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies]
36-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true }
35+
[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies]
36+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] }
3737

38-
[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies]
39-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true }
38+
[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
39+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }
40+
41+
[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies]
42+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] }
4043

4144
[build-dependencies]
4245
napi-build = { workspace = true }

napi/transform/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ rustc-hash = { workspace = true }
3131
napi = { workspace = true }
3232
napi-derive = { workspace = true }
3333

34-
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies]
35-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true }
34+
[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies]
35+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] }
3636

37-
[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies]
38-
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true }
37+
[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
38+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }
39+
40+
[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies]
41+
mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] }
3942

4043
[build-dependencies]
4144
napi-build = { workspace = true }

0 commit comments

Comments
 (0)