Skip to content

Rename XARGO env var to XARGO_CHECK #1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/bin/cargo-miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ fn cargo() -> Command {
}
}

fn xargo() -> Command {
if let Ok(val) = std::env::var("XARGO") {
fn xargo_check() -> Command {
if let Ok(val) = std::env::var("XARGO_CHECK") {
// Bootstrap tells us where to find xargo
Command::new(val)
} else {
Expand Down Expand Up @@ -202,7 +202,7 @@ fn test_sysroot_consistency() {
}

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

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