From 09db647f84d29e278fc5ab6c85310a5ffc79eda3 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 15 May 2025 16:47:59 +0800 Subject: [PATCH 1/2] fix(napi): enable `no_opt_arch` feature on linux aarch64 fixes #11045 --- apps/oxlint/Cargo.toml | 11 +++++++---- napi/minify/Cargo.toml | 11 +++++++---- napi/parser/Cargo.toml | 11 +++++++---- napi/transform/Cargo.toml | 11 +++++++---- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index 91f2a2db9d13e..96352efb24d54 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -40,11 +40,14 @@ serde_json = { workspace = true } tempfile = { workspace = true } tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature -[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } -[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } +[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } + +[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } [dev-dependencies] insta = { workspace = true } diff --git a/napi/minify/Cargo.toml b/napi/minify/Cargo.toml index 4ceda0115b9c3..934bc6fecd39d 100644 --- a/napi/minify/Cargo.toml +++ b/napi/minify/Cargo.toml @@ -33,11 +33,14 @@ oxc_syntax = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } -[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true } +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } -[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true } +[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } + +[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } [build-dependencies] napi-build = { workspace = true } diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index 8a0f3f6906ee6..211b91d184b5c 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -32,11 +32,14 @@ rustc-hash = { workspace = true } napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true } -[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true } +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } -[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true } +[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } + +[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } [build-dependencies] napi-build = { workspace = true } diff --git a/napi/transform/Cargo.toml b/napi/transform/Cargo.toml index 95e8aa0093298..b80ab43a5576a 100644 --- a/napi/transform/Cargo.toml +++ b/napi/transform/Cargo.toml @@ -31,11 +31,14 @@ rustc-hash = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } -[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"], optional = true } +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } -[target.'cfg(any(all(target_os = "linux", not(target_arch = "arm")), target_os = "freebsd"))'.dependencies] -mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"], optional = true } +[target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } + +[target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } [build-dependencies] napi-build = { workspace = true } From b58ef676c4645daf2aba8b674255e2c27860e402 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 08:54:10 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- apps/oxlint/Cargo.toml | 4 ++-- napi/minify/Cargo.toml | 4 ++-- napi/parser/Cargo.toml | 4 ++-- napi/transform/Cargo.toml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index 96352efb24d54..f5c240105d9db 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -41,10 +41,10 @@ tempfile = { workspace = true } tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature [target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } [target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } diff --git a/napi/minify/Cargo.toml b/napi/minify/Cargo.toml index 934bc6fecd39d..1e805440004d7 100644 --- a/napi/minify/Cargo.toml +++ b/napi/minify/Cargo.toml @@ -34,10 +34,10 @@ napi = { workspace = true } napi-derive = { workspace = true } [target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } [target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index 211b91d184b5c..9544109aa5c29 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -33,10 +33,10 @@ napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true } [target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } [target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } diff --git a/napi/transform/Cargo.toml b/napi/transform/Cargo.toml index b80ab43a5576a..b3ef5c7df4578 100644 --- a/napi/transform/Cargo.toml +++ b/napi/transform/Cargo.toml @@ -32,10 +32,10 @@ napi = { workspace = true } napi-derive = { workspace = true } [target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] -mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } +mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } [target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] }