Skip to content

Commit fb1dc34

Browse files
committed
Auto merge of rust-lang#77003 - joshtriplett:remove-duplicate-link-libraries, r=Mark-Simulacrum
Remove duplicated library links between std and libc The libc crate is already responsible for linking in the appropriate libraries, and std doing the same thing results in duplicated library names on the linker command line. Removing this duplication slightly reduces linker time, and makes it simpler to adjust the set or order of linked libraries in one place (such as to add static linking support).
2 parents b01326a + f9457fb commit fb1dc34

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

library/std/build.rs

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ fn main() {
88
println!("cargo:rustc-link-lib=dl");
99
println!("cargo:rustc-link-lib=log");
1010
println!("cargo:rustc-link-lib=gcc");
11-
} else if !target.contains("musl") {
12-
println!("cargo:rustc-link-lib=dl");
13-
println!("cargo:rustc-link-lib=rt");
14-
println!("cargo:rustc-link-lib=pthread");
1511
}
1612
} else if target.contains("freebsd") {
1713
println!("cargo:rustc-link-lib=execinfo");

0 commit comments

Comments
 (0)