From 1750af736a4dd2543741ccb7e7598cb14c3247ed Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 13 May 2025 21:28:21 -0600 Subject: [PATCH] Try target-feature=+crt-static --- .cargo/config.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 7569f18..2a6dd15 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,4 @@ -[target.x86_64-pc-windows-msvc] -linker = "rust-lld" - -[target.aarch64-pc-windows-msvc] -linker = "rust-lld" +# statically link the C runtime so the executable does not depend on +# that shared/dynamic library. +[target.'cfg(all(target_env = "msvc", target_os = "windows"))'] +rustflags = ["-C", "target-feature=+crt-static"]