Skip to content

Commit 146fe0a

Browse files
committed
Add proper library dependencies for libstd on CloudABI.
Don't attempt to build libunwind on CloudABI, as libunwind is already provided by the system by default.
1 parent 304a7b7 commit 146fe0a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/libstd/build.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ fn main() {
2020
let target = env::var("TARGET").expect("TARGET was not set");
2121
let host = env::var("HOST").expect("HOST was not set");
2222
if cfg!(feature = "backtrace") &&
23-
!target.contains("msvc") &&
23+
!target.contains("cloudabi") &&
2424
!target.contains("emscripten") &&
2525
!target.contains("fuchsia") &&
26+
!target.contains("msvc") &&
2627
!target.contains("wasm32")
2728
{
2829
let _ = build_libbacktrace(&host, &target);
@@ -74,6 +75,12 @@ fn main() {
7475
println!("cargo:rustc-link-lib=zircon");
7576
println!("cargo:rustc-link-lib=fdio");
7677
println!("cargo:rustc-link-lib=launchpad"); // for std::process
78+
} else if target.contains("cloudabi") {
79+
if cfg!(feature = "backtrace") {
80+
println!("cargo:rustc-link-lib=unwind");
81+
}
82+
println!("cargo:rustc-link-lib=c");
83+
println!("cargo:rustc-link-lib=compiler_rt");
7784
}
7885
}
7986

0 commit comments

Comments
 (0)