Skip to content

Commit e8acaef

Browse files
authored
Repo: Explicitly specify static crt for musl targets (#1893)
This is currently Rust's default behavior, but it will be changing at some point in the future (rust-lang/rust#144513). Just specifying it explicitly now doesn't hurt, and avoids the warning noise whenever it shows up.
1 parent 0dfc516 commit e8acaef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ rustflags = [
8989
rustflags = [
9090
# Use the musl from the sysroot, not from the Rust distribution.
9191
"-Clink-self-contained=n",
92+
# Force musl to be statically linked in
93+
"-Ctarget-feature=+crt-static",
9294
# Use RELR relocation format, which is considerably smaller.
9395
"-Clink-arg=-Wl,-z,pack-relative-relocs",
9496
]

0 commit comments

Comments
 (0)