1
Fork 0

Auto merge of #80818 - 12101111:system-libunwind, r=Mark-Simulacrum

Don't build in-tree llvm-libunwind if system-llvm-libunwind is enable

When "system-llvm-libunwind" is enabled, some target eg. musl still build in-tree llvm-libunwind which is useless.
This commit is contained in:
bors 2021-01-11 03:24:14 +00:00
commit 00c5c3922f

View file

@ -4,6 +4,10 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");
let target = env::var("TARGET").expect("TARGET was not set");
if cfg!(feature = "system-llvm-libunwind") {
return;
}
if cfg!(feature = "llvm-libunwind")
&& ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
{