Skip to content

Commit 3311756

Browse files
committed
Auto merge of #1201 - Aaron1011:fix/bootstrap-xargo-check, r=RalfJung
Rename XARGO env var to XARGO_CHECK This reflects the fact that we want bootstrap to override `xargo-check`, not `xargo
2 parents 7cdcdec + 68f7019 commit 3311756

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/cargo-miri.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ fn cargo() -> Command {
100100
}
101101
}
102102

103-
fn xargo() -> Command {
104-
if let Ok(val) = std::env::var("XARGO") {
103+
fn xargo_check() -> Command {
104+
if let Ok(val) = std::env::var("XARGO_CHECK") {
105105
// Bootstrap tells us where to find xargo
106106
Command::new(val)
107107
} else {
@@ -202,7 +202,7 @@ fn test_sysroot_consistency() {
202202
}
203203

204204
fn xargo_version() -> Option<(u32, u32, u32)> {
205-
let out = xargo().arg("--version").output().ok()?;
205+
let out = xargo_check().arg("--version").output().ok()?;
206206
if !out.status.success() {
207207
return None;
208208
}
@@ -280,7 +280,7 @@ fn setup(ask_user: bool) {
280280

281281
// First, we need xargo.
282282
if xargo_version().map_or(true, |v| v < XARGO_MIN_VERSION) {
283-
if std::env::var("XARGO").is_ok() {
283+
if std::env::var("XARGO_CHECK").is_ok() {
284284
// The user manually gave us a xargo binary; don't do anything automatically.
285285
show_error(format!("Your xargo is too old; please upgrade to the latest version"))
286286
}
@@ -376,7 +376,7 @@ path = "lib.rs"
376376
// Prepare xargo invocation.
377377
let target = get_arg_flag_value("--target");
378378
let print_sysroot = !ask_user && has_arg_flag("--print-sysroot"); // whether we just print the sysroot path
379-
let mut command = xargo();
379+
let mut command = xargo_check();
380380
command.arg("build").arg("-q");
381381
command.current_dir(&dir);
382382
command.env("RUSTFLAGS", miri::miri_default_args().join(" "));

0 commit comments

Comments
 (0)