diff options
| author | bors <bors@rust-lang.org> | 2017-12-29 23:07:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-29 23:07:42 +0000 |
| commit | 35681fbc76142856a3475691c042ddec8dec31c5 (patch) | |
| tree | 48dce8b68a4b68aee094908dd72e3e75565e3bef /src/libstd | |
| parent | 2dad872a2dae12b882cd73536a66c9289a2b65ae (diff) | |
| parent | 146fe0ad75ea9e7f2ba69aa40d496c862aae7814 (diff) | |
| download | rust-35681fbc76142856a3475691c042ddec8dec31c5.tar.gz rust-35681fbc76142856a3475691c042ddec8dec31c5.zip | |
Auto merge of #47026 - EdSchouten:cloudabi-unwind, r=kennytm
Link against -lunwind on CloudABI. CloudABI makes use of LLVM's libunwind to do stack unwinding. It is installed under the name libunwind.a.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/build.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 8a28105ff81..a41c155f3fb 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -20,9 +20,10 @@ fn main() { let target = env::var("TARGET").expect("TARGET was not set"); let host = env::var("HOST").expect("HOST was not set"); if cfg!(feature = "backtrace") && - !target.contains("msvc") && + !target.contains("cloudabi") && !target.contains("emscripten") && !target.contains("fuchsia") && + !target.contains("msvc") && !target.contains("wasm32") { let _ = build_libbacktrace(&host, &target); @@ -74,6 +75,12 @@ fn main() { println!("cargo:rustc-link-lib=zircon"); println!("cargo:rustc-link-lib=fdio"); println!("cargo:rustc-link-lib=launchpad"); // for std::process + } else if target.contains("cloudabi") { + if cfg!(feature = "backtrace") { + println!("cargo:rustc-link-lib=unwind"); + } + println!("cargo:rustc-link-lib=c"); + println!("cargo:rustc-link-lib=compiler_rt"); } } |
