Skip to content

Commit 77ed6e4

Browse files
committed
restore the RUSTC/RUSTDOC env after rustc-fake cmd substitution
1 parent 0496037 commit 77ed6e4

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/Cargo.toml b/Cargo.toml
2+
index 12ee1eec..9a92219e 100644
3+
--- a/Cargo.toml
4+
+++ b/Cargo.toml
5+
@@ -205,6 +205,7 @@ version = "0.4.26"
6+
default-features = false
7+
8+
[features]
9+
+default = [ "vendored-openssl" ]
10+
deny-warnings = []
11+
pretty-env-logger = ["pretty_env_logger"]
12+
vendored-openssl = ["openssl/vendored"]

collector/src/bin/rustc-fake.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ fn main() {
3232
let mut args_os = env::args_os();
3333
let name = args_os.next().unwrap().into_string().unwrap();
3434

35-
let mut args = args_os.collect::<Vec<_>>();
36-
let rustc = env::var_os("RUSTC_REAL").unwrap();
3735
let actually_rustdoc = name.ends_with("rustdoc-fake");
3836
let tool = if actually_rustdoc {
3937
let rustdoc = env::var_os("RUSTDOC_REAL").unwrap();
4038
rustdoc
4139
} else {
42-
rustc
40+
// rustc
41+
args_os.next().unwrap()
4342
};
4443

44+
let mut args = args_os.collect::<Vec<_>>();
45+
4546
if let Some(count) = env::var("RUSTC_THREAD_COUNT")
4647
.ok()
4748
.and_then(|v| v.parse::<u32>().ok())

collector/src/execute/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ impl<'a> CargoProcess<'a> {
148148
cmd
149149
// Not all cargo invocations (e.g. `cargo clean`) need all of these
150150
// env vars set, but it doesn't hurt to have them.
151-
.env("RUSTC", &*FAKE_RUSTC)
152-
.env("RUSTC_REAL", &self.compiler.rustc)
151+
.env("RUSTC_WRAPPER", &*FAKE_RUSTC)
152+
.env("RUSTC", &self.compiler.rustc)
153153
// We separately pass -Cincremental to the leaf crate --
154154
// CARGO_INCREMENTAL is cached separately for both the leaf crate
155155
// and any in-tree dependencies, and we don't want that; it wastes

0 commit comments

Comments
 (0)