Skip to content
Myr

Merge pull request #358 from dtolnay/workspacewrapper

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Apply RUSTC_WORKSPACE_WRAPPER

authored by David Tolnay · committed by GitHub · parents 9f84a37, 939db01 · Browse files · 1 file+10 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−9 removed

  • other:+10 added−9 removed

1 file+10 added−9 removed

modified:build.rs+10 added-9 removed
1use std::env;2use std::ffi::OsString;3use std::iter;4use std::path::Path;5use std::process::{self, Command, Stdio};6use std::str;7
95 unmodified lines
103 let rustc = cargo_env_var("RUSTC");104 let out_dir = cargo_env_var("OUT_DIR");105 let probefile = Path::new("build").join("probe.rs");106106 // Make sure to pick up Cargo rustc configuration.107 let mut cmd = if let Some(wrapper) = env::var_os("RUSTC_WRAPPER") {108 let mut cmd = Command::new(wrapper);109 // The wrapper's first argument is supposed to be the path to rustc.110 cmd.arg(rustc);111 cmd112 } else {113 Command::new(rustc)114 };107 let rustc_wrapper = env::var_os("RUSTC_WRAPPER").filter(|wrapper| !wrapper.is_empty());108 let rustc_workspace_wrapper =109 env::var_os("RUSTC_WORKSPACE_WRAPPER").filter(|wrapper| !wrapper.is_empty());110 let mut rustc = rustc_wrapper111 .into_iter()112 .chain(rustc_workspace_wrapper)113 .chain(iter::once(rustc));114 let mut cmd = Command::new(rustc.next().unwrap());115 cmd.args(rustc);116117 if !rustc_bootstrap {118 cmd.env_remove("RUSTC_BOOTSTRAP");119 }
50 unmodified lines