mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-29 03:55:14 +00:00
codex's large async futures overflow cargo test's 2 MiB spawned-thread stacks (SIGABRT in startup tests). nextest (.config/nextest.toml, used by CI) runs each test in its own process on the 8 MiB main thread, so they pass there. Set RUST_MIN_STACK=8 MiB for cargo-launched test processes to match. Additive: nextest, the Windows /STACK link-arg, and the directly-executed shipped binary are all unaffected.
21 lines
1.1 KiB
TOML
21 lines
1.1 KiB
TOML
[target.'cfg(all(windows, target_env = "msvc"))']
|
|
rustflags = ["-C", "link-arg=/STACK:8388608", "-C", "target-feature=+crt-static"]
|
|
|
|
# MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
|
|
# https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
|
|
# Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
|
|
[target.aarch64-pc-windows-msvc]
|
|
rustflags = ["-C", "link-arg=/STACK:8388608", "-C", "link-arg=/arm64hazardfree"]
|
|
|
|
[target.'cfg(all(windows, target_env = "gnu"))']
|
|
rustflags = ["-C", "link-arg=-Wl,--stack,8388608"]
|
|
|
|
# `cargo test` runs each test on a 2 MiB spawned thread, which overflows on
|
|
# codex's large async futures. nextest (the CI runner, see .config/nextest.toml)
|
|
# runs each test in its own process on the 8 MiB main thread, so they pass there;
|
|
# this gives plain `cargo test` the same 8 MiB headroom. Only affects
|
|
# cargo-launched processes (tests, `cargo run`) — never the shipped binary, which
|
|
# is executed directly and so never reads this.
|
|
[env]
|
|
RUST_MIN_STACK = "8388608"
|