Skip to content

Commit 4168789

Browse files
committed
Simplify the RUSTC_WRAPPER check
This should be compatible with older versions of rustc, to get the branches more in sync. (backport <#3910>) (cherry picked from commit 3c15a55)
1 parent 5078335 commit 4168789

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ fn main() {
197197
/// Run `rustc --version` and capture the output, adjusting arguments as needed if `clippy-driver`
198198
/// is used instead.
199199
fn rustc_version_cmd(is_clippy_driver: bool) -> Output {
200-
let rustc_wrapper = env::var_os("RUSTC_WRAPPER").filter(|w| !w.is_empty());
201200
let rustc = env::var_os("RUSTC").expect("Failed to get rustc version: missing RUSTC env");
202201

203-
let mut cmd = match rustc_wrapper {
202+
let mut cmd = match env::var_os("RUSTC_WRAPPER") {
203+
Some(wrapper) if wrapper.is_empty() => Command::new(rustc),
204204
Some(wrapper) => {
205205
let mut cmd = Command::new(wrapper);
206206
cmd.arg(rustc);

0 commit comments

Comments
 (0)