Skip to content

Commit 191d519

Browse files
branchseerclaude
andcommitted
fix: use cargo linker config key instead of rustflags for path resolution
The linker path specified via rustflags (-C linker=...) is passed to rustc which doesn't resolve it relative to the config file. Using Cargo's native `linker` key resolves relative paths correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 12a86c9 commit 191d519

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ bindeps = true
77
# Linker wrappers for musl targets. On Linux hosts these use the system cc directly;
88
# on non-Linux hosts (macOS, Windows) they cross-compile via cargo-zigbuild.
99
[target.x86_64-unknown-linux-musl]
10-
rustflags = ["-C", "linker=.cargo/zigcc-x86_64-unknown-linux-musl"]
10+
linker = ".cargo/zigcc-x86_64-unknown-linux-musl"
1111

1212
[target.aarch64-unknown-linux-musl]
13-
rustflags = ["-C", "linker=.cargo/zigcc-aarch64-unknown-linux-musl"]
13+
linker = ".cargo/zigcc-aarch64-unknown-linux-musl"

0 commit comments

Comments
 (0)