unwind: don't build dependency when building for Miri

This commit is contained in:
Ralf Jung 2022-08-14 09:31:03 -04:00
parent 2fbc08e2ce
commit 63113c8b0c

View File

@ -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();