Skip to content

Commit f9457fb

Browse files
committed
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).
1 parent 0f9f0b3 commit f9457fb

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)