From deec7b5b1ef82ace56d3b1ddd5d4764dae8f37fd Mon Sep 17 00:00:00 2001 From: David Wiesen Date: Wed, 20 May 2026 11:05:27 -0700 Subject: [PATCH] Statically link Windows app-server CRT --- codex-rs/.cargo/config.toml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/codex-rs/.cargo/config.toml b/codex-rs/.cargo/config.toml index 5d5eb8fd6f..09465f30c8 100644 --- a/codex-rs/.cargo/config.toml +++ b/codex-rs/.cargo/config.toml @@ -1,11 +1,18 @@ [target.'cfg(all(windows, target_env = "msvc"))'] -rustflags = ["-C", "link-arg=/STACK:8388608"] +rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=/STACK:8388608"] # 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"] +rustflags = [ + "-C", + "target-feature=+crt-static", + "-C", + "link-arg=/STACK:8388608", + "-C", + "link-arg=/arm64hazardfree", +] [target.'cfg(all(windows, target_env = "gnu"))'] rustflags = ["-C", "link-arg=-Wl,--stack,8388608"]