mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
fix(common): Fix jemalloc (#4794)
This commit is contained in:
parent
f4a60e2eda
commit
adf70f6c07
1
.github/workflows/publish-node.yml
vendored
1
.github/workflows/publish-node.yml
vendored
@ -85,6 +85,7 @@ jobs:
|
||||
rustup target add aarch64-unknown-linux-gnu &&
|
||||
RUSTFLAGS='-Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin --target aarch64-unknown-linux-gnu &&
|
||||
cp ./target/aarch64-unknown-linux-gnu/release/swc . && chmod +x ./swc &&
|
||||
export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc &&
|
||||
yarn build --target aarch64-unknown-linux-gnu &&
|
||||
llvm-strip -x swc.linux-arm64-gnu.node
|
||||
- host: ubuntu-18.04
|
||||
|
@ -16,5 +16,5 @@ bench = false
|
||||
[target.'cfg(not(target_os = "linux"))'.dependencies]
|
||||
mimalloc-rust = { version = "0.1" }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
[target.'cfg(all(target_os = "linux", target_env = "gnu", any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
|
||||
tikv-jemallocator = { version = "0.4", features = ["disable_initial_exec_tls"] }
|
||||
|
@ -6,6 +6,10 @@
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc_rust::GlobalMiMalloc = mimalloc_rust::GlobalMiMalloc;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(all(
|
||||
target_os = "linux",
|
||||
target_env = "gnu",
|
||||
any(target_arch = "x86_64", target_arch = "aarch64")
|
||||
))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
Loading…
Reference in New Issue
Block a user