X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Funwind%2Fbuild.rs;h=31af390253b6f108c64d26c057295a482b992b84;hb=450e99f93795c81c1f2d10be27fb3a98be5b0cfc;hp=126e41d1e2015ecc5c930904222c1f45598dba06;hpb=b8b3ead67a1518dbd0cffa2f128394dcb81c5145;p=rust.git 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 @@ 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();