From 77ade436667566444defb80dd1a0e7183e4faff1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 7 Feb 2024 21:21:36 +0100 Subject: [PATCH] double default stack size (#61781) ### Why? Some packages require larger stack to compile correctly Native build: https://github.com/vercel/next.js/actions/runs/7818270269 Closes PACK-2433 --------- Co-authored-by: OJ Kwon <1210596+kwonoj@users.noreply.github.com> --- .cargo/config.toml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index a38223d24f..b34cf4f171 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -7,9 +7,15 @@ rustdocflags = [] [target.x86_64-pc-windows-msvc] linker = "rust-lld" -rustflags = ["-C", "target-feature=+crt-static"] +rustflags = [ + "-C", "target-feature=+crt-static", + "-C", "link-args=-Wl,-zstack-size=4194304", +] [target.i686-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] +rustflags = [ + "-C", "target-feature=+crt-static", + "-C", "link-args=-Wl,-zstack-size=4194304", +] [target.aarch64-unknown-linux-gnu] linker = "aarch64-linux-gnu-gcc" @@ -20,6 +26,7 @@ rustflags = [ "--cfg", "tokio_unstable", "-Zshare-generics=y", + "-C", "link-args=-Wl,-zstack-size=4194304", "-Csymbol-mangling-version=v0", "-Ctarget-feature=-crt-static", "-Clink-arg=-lgcc", @@ -28,6 +35,11 @@ rustflags = [ [target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc" +[target.'any(not(target.wasm32-unknown-unknown), not(wasm32-wasi-preview1-threads))'] +rustflags = [ + "-C", "link-args=-Wl,-zstack-size=4194304", +] + [target.'cfg(all())'] rustflags = [ "--cfg",