Skip to content

Commit 56b02b2

Browse files
authored
Rollup merge of rust-lang#100532 - RalfJung:unwind-miri, r=Mark-Simulacrum
unwind: don't build dependency when building for Miri This is basically re-submitting rust-lang#94813. In that PR there was a suggestion to instead have bootstrap set a `RUST_CHECK` env var and use that rather than doing something Miri-specific. However, such an env var would mean that when switching between `./x.py check` and `./x.py build`, the build script gets re-run each time, which doesn't seem good. So I think for now checking for Miri probably causes fewer problems. r? ````@Mark-Simulacrum````
2 parents 1e93994 + 63113c8 commit 56b02b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

library/unwind/build.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ use std::env;
22

33
fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
5-
let target = env::var("TARGET").expect("TARGET was not set");
5+
println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI");
6+
7+
if env::var_os("CARGO_CFG_MIRI").is_some() {
8+
// Miri doesn't need the linker flags or a libunwind build.
9+
return;
10+
}
611

12+
let target = env::var("TARGET").expect("TARGET was not set");
713
if target.contains("android") {
814
let build = cc::Build::new();
915

0 commit comments

Comments
 (0)