Skip to content

Commit 1750af7

Browse files
committed
Try target-feature=+crt-static
1 parent 731b604 commit 1750af7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.cargo/config.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
[target.x86_64-pc-windows-msvc]
2-
linker = "rust-lld"
3-
4-
[target.aarch64-pc-windows-msvc]
5-
linker = "rust-lld"
1+
# statically link the C runtime so the executable does not depend on
2+
# that shared/dynamic library.
3+
[target.'cfg(all(target_env = "msvc", target_os = "windows"))']
4+
rustflags = ["-C", "target-feature=+crt-static"]

0 commit comments

Comments
 (0)