mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Auto merge of #930 - RalfJung:build, r=RalfJung
test that build scripts do not run in Miri @elichai reported something that sounded a lot like build script running in Miri. But as this test shows, build scripts are not run by Miri, they are run normally. @elichai are you sure the [env var usage you were referring to](https://github.com/rust-lang/miri/issues/641#issuecomment-524989482) was only in a build script? Those shouldn't be affected by Miri flags at all. Is your code available somewhere so that I can try to reproduce?
This commit is contained in:
@@ -5,7 +5,6 @@ license = "MIT/Apache-2.0"
|
||||
name = "miri"
|
||||
repository = "https://github.com/rust-lang/miri"
|
||||
version = "0.1.0"
|
||||
build = "build.rs"
|
||||
default-run = "miri"
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#![feature(asm)]
|
||||
|
||||
fn not_in_miri() -> i32 {
|
||||
// Inline assembly definitely does not work in Miri.
|
||||
let dummy = 42;
|
||||
unsafe {
|
||||
asm!("" : : "r"(&dummy));
|
||||
}
|
||||
return dummy;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
not_in_miri();
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
Reference in New Issue
Block a user