2020-04-20 03:38:38 -05:00
|
|
|
#![feature(llvm_asm)]
|
2019-08-28 02:15:31 -05:00
|
|
|
|
|
|
|
fn not_in_miri() -> i32 {
|
|
|
|
// Inline assembly definitely does not work in Miri.
|
|
|
|
let dummy = 42;
|
|
|
|
unsafe {
|
2020-04-20 03:38:38 -05:00
|
|
|
llvm_asm!("" : : "r"(&dummy));
|
2019-08-28 02:15:31 -05:00
|
|
|
}
|
|
|
|
return dummy;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
not_in_miri();
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
2020-09-12 06:10:23 -05:00
|
|
|
println!("cargo:rerun-if-env-changed=MIRITESTVAR");
|
|
|
|
println!("cargo:rustc-env=MIRITESTVAR=testval");
|
2019-08-28 02:15:31 -05:00
|
|
|
}
|