Skip to content

Commit 2e1ede7

Browse files
committed
Use custom Xargo with cargo_mode support
1 parent da61b24 commit 2e1ede7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/cargo-miri.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::{PathBuf, Path};
66
use std::process::Command;
77
use std::ops::Not;
88

9-
const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 17);
9+
const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 18);
1010

1111
const CARGO_MIRI_HELP: &str = r#"Interprets bin crates and tests in Miri
1212
@@ -266,7 +266,7 @@ fn setup(ask_user: bool) {
266266
show_error(format!("Your xargo is too old; please upgrade to the latest version"))
267267
}
268268
let mut cmd = cargo();
269-
cmd.args(&["install", "xargo", "-f"]);
269+
cmd.args(&["install", "-f", "--git", "https://github.com/Aaron1011/xargo", "--branch", "feature/cargo-mode"]);
270270
ask_to_run(cmd, ask_user, "install a recent enough xargo");
271271
}
272272

@@ -294,6 +294,7 @@ fn setup(ask_user: bool) {
294294
// The interesting bit: Xargo.toml
295295
File::create(dir.join("Xargo.toml")).unwrap()
296296
.write_all(br#"
297+
cargo_mode = "check"
297298
[dependencies.std]
298299
default_features = false
299300
# We need the `panic_unwind` feature because we use the `unwind` panic strategy.
@@ -323,7 +324,7 @@ path = "lib.rs"
323324
// that `cargo check` has exactly the behavior that we want:
324325
// it emits crate metadata (including MIR) without running any
325326
// codegen.
326-
command.arg("check").arg("-q");
327+
command.arg("check").arg("-v");
327328
command.current_dir(&dir);
328329
command.env("RUSTFLAGS", miri::miri_default_args().join(" "));
329330
command.env("XARGO_HOME", dir.to_str().unwrap());

0 commit comments

Comments
 (0)