diff options
author | Ralf Jung <post@ralfj.de> | 2022-08-14 09:31:03 -0400 |
---|---|---|
committer | Ralf Jung <post@ralfj.de> | 2022-08-15 12:54:12 -0400 |
commit | 63113c8b0cb97482e0ba65cf8429fe2ee7d1ca51 (patch) | |
tree | 13940568483c60d278fa8769794b1825860a282e /library | |
parent | 2fbc08e2ce64dee45a29cb6133da6b32366268aa (diff) | |
download | rust-63113c8b0cb97482e0ba65cf8429fe2ee7d1ca51.tar.gz |
unwind: don't build dependency when building for Miri
Diffstat (limited to 'library')
-rw-r--r-- | library/unwind/build.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/unwind/build.rs b/library/unwind/build.rs index 126e41d1e20..31af390253b 100644 --- a/library/unwind/build.rs +++ b/library/unwind/build.rs @@ -2,8 +2,14 @@ use std::env; fn main() { println!("cargo:rerun-if-changed=build.rs"); - let target = env::var("TARGET").expect("TARGET was not set"); + println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI"); + + if env::var_os("CARGO_CFG_MIRI").is_some() { + // Miri doesn't need the linker flags or a libunwind build. + return; + } + let target = env::var("TARGET").expect("TARGET was not set"); if target.contains("android") { let build = cc::Build::new(); |