Skip to content

Commit

Permalink
Auto merge of #80818 - 12101111:system-libunwind, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jan 11, 2021
2 parents 26d451f + 5de0680 commit 00c5c39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/unwind/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
{
Expand Down

0 comments on commit 00c5c39

Please sign in to comment.