Skip to content

Commit 90ce436

Browse files
committed
chore: update linker config
1 parent b41d8ec commit 90ce436

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.cargo/config.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,22 @@ rustflags = ["-C", "target-feature=+crt-static"]
66

77
[target.i686-pc-windows-msvc]
88
rustflags = ["-C", "target-feature=+crt-static"]
9+
10+
[target.aarch64-pc-windows-msvc]
11+
rustflags = ["-C", "target-feature=+crt-static"]
12+
13+
[target.'cfg(target_os = "windows")']
14+
rustflags = [
15+
# Disables linking against the default Universal C Runtime (libucrt.lib). This prevents conflicts if another CRT library is linked manually.
16+
"-C",
17+
"link-args=/NODEFAULTLIB:libucrt.lib",
18+
# Manually adds ucrt.lib (the Universal CRT) as a default library to link against, replacing the one you just excluded above.
19+
# This ensures consistent linking when multiple CRTs might be available.
20+
"-C",
21+
"link-args=/DEFAULTLIB:ucrt.lib",
22+
]
23+
24+
# LLD linker is currently broken for us, opt out.
25+
# https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/#what-s-in-1-90-0-stable
26+
[target.x86_64-unknown-linux-gnu]
27+
rustflags = ["-C", "linker-features=-lld"]

0 commit comments

Comments
 (0)