Rollup merge of #100532 - RalfJung:unwind-miri, r=Mark-Simulacrum
unwind: don't build dependency when building for Miri This is basically re-submitting https://github.com/rust-lang/rust/pull/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````
This commit is contained in:
commit
56b02b2137
@ -2,8 +2,14 @@ use std::env;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rerun-if-changed=build.rs");
|
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") {
|
if target.contains("android") {
|
||||||
let build = cc::Build::new();
|
let build = cc::Build::new();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user