We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
xargo check
xargo build
1 parent 07fa6f8 commit da61b24Copy full SHA for da61b24
src/bin/cargo-miri.rs
@@ -318,7 +318,12 @@ path = "lib.rs"
318
let target = get_arg_flag_value("--target");
319
let print_sysroot = !ask_user && has_arg_flag("--print-sysroot"); // whether we just print the sysroot path
320
let mut command = xargo();
321
- command.arg("build").arg("-q");
+ // This may seen somewhat suprising - we are 'building' libstd
322
+ // by running (the equivalent of) `cargo check`. It turns out
323
+ // that `cargo check` has exactly the behavior that we want:
324
+ // it emits crate metadata (including MIR) without running any
325
+ // codegen.
326
+ command.arg("check").arg("-q");
327
command.current_dir(&dir);
328
command.env("RUSTFLAGS", miri::miri_default_args().join(" "));
329
command.env("XARGO_HOME", dir.to_str().unwrap());
0 commit comments