Skip to content

Commit ac1b675

Browse files
committed
Auto merge of #43104 - nbaksalyar:rustbuild-illumos-fix, r=sanxiyn
Fix Rustbuild linking on Illumos Illumos (an OpenSolaris fork) expects to get several extra library references for some system functions used by Rust standard library. This commit adds required linker options to rustbuild, which is currently doesn't work on Illumos-based operating systems.
2 parents 4d4d76c + e084bb2 commit ac1b675

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ fn main() {
4141
} else if target.contains("dragonfly") || target.contains("bitrig") ||
4242
target.contains("netbsd") || target.contains("openbsd") {
4343
println!("cargo:rustc-link-lib=pthread");
44+
} else if target.contains("solaris") {
45+
println!("cargo:rustc-link-lib=socket");
46+
println!("cargo:rustc-link-lib=posix4");
47+
println!("cargo:rustc-link-lib=pthread");
4448
} else if target.contains("apple-darwin") {
4549
println!("cargo:rustc-link-lib=System");
4650

0 commit comments

Comments
 (0)