From 7cd1c93e3c1cddaebf3f760b2e951706785353c7 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 27 Mar 2026 21:18:04 -0700 Subject: [PATCH] bazel: add Windows gnullvm stack flags to unit test binaries --- defs.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/defs.bzl b/defs.bzl index fee01a151a..02cbbc6295 100644 --- a/defs.bzl +++ b/defs.bzl @@ -200,11 +200,14 @@ def codex_rust_crate( name = unit_test_binary, crate = name, deps = all_crate_deps(normal = True, normal_dev = True) + maybe_deps + deps_extra, + # Unit tests also compile to standalone Windows executables, so + # keep their stack reserve aligned with binaries and integration + # tests under gnullvm. # Bazel has emitted both `codex-rs//...` and # `../codex-rs//...` paths for `file!()`. Strip either # prefix so the workspace-root launcher sees Cargo-like metadata # such as `tui/src/...`. - rustc_flags = rustc_flags_extra + [ + rustc_flags = rustc_flags_extra + WINDOWS_GNULLVM_RUSTC_STACK_FLAGS + [ "--remap-path-prefix=../codex-rs=", "--remap-path-prefix=codex-rs=", ],