Skip to content

Commit e084bb2

Browse files
committed
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.
1 parent b80b659 commit e084bb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/build.rs

Lines changed: 4 additions & 0 deletions
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)