summaryrefslogtreecommitdiff
path: root/library/unwind/build.rs
diff options
context:
space:
mode:
author12101111 <w12101111@gmail.com>2021-01-09 02:23:02 +0800
committer12101111 <w12101111@gmail.com>2021-01-09 12:50:08 +0800
commit5de06800c71c2e87fb5a2bfabc57c001f91c9cf3 (patch)
tree8f4a547f88d174071a0bad78607e9f3048252027 /library/unwind/build.rs
parent26438b473883ea607b30288e461187f0fb2fe589 (diff)
downloadrust-5de06800c71c2e87fb5a2bfabc57c001f91c9cf3.tar.gz
Don't build in-tree llvm-libunwind if system-llvm-libunwind is enable
Diffstat (limited to 'library/unwind/build.rs')
-rw-r--r--library/unwind/build.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/unwind/build.rs b/library/unwind/build.rs
index fae760c4a4e..694e6b98c82 100644
--- a/library/unwind/build.rs
+++ b/library/unwind/build.rs
@@ -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"))
{