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")) {