From 5de06800c71c2e87fb5a2bfabc57c001f91c9cf3 Mon Sep 17 00:00:00 2001 From: 12101111 Date: Sat, 9 Jan 2021 02:23:02 +0800 Subject: [PATCH] Don't build in-tree llvm-libunwind if system-llvm-libunwind is enable --- library/unwind/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/unwind/build.rs b/library/unwind/build.rs index fae760c4a4e6b..694e6b98c82e3 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")) {