@@ -53,6 +53,7 @@ impl Rustc {
53
53
& path,
54
54
rustup_rustc,
55
55
cache_location,
56
+ config,
56
57
) ;
57
58
58
59
let mut cmd = ProcessBuilder :: new ( & path) ;
@@ -174,10 +175,11 @@ impl Cache {
174
175
rustc : & Path ,
175
176
rustup_rustc : & Path ,
176
177
cache_location : Option < PathBuf > ,
178
+ config : & Config ,
177
179
) -> Cache {
178
180
match (
179
181
cache_location,
180
- rustc_fingerprint ( wrapper, workspace_wrapper, rustc, rustup_rustc) ,
182
+ rustc_fingerprint ( wrapper, workspace_wrapper, rustc, rustup_rustc, config ) ,
181
183
) {
182
184
( Some ( cache_location) , Ok ( rustc_fingerprint) ) => {
183
185
let empty = CacheData {
@@ -297,6 +299,7 @@ fn rustc_fingerprint(
297
299
workspace_wrapper : Option < & Path > ,
298
300
rustc : & Path ,
299
301
rustup_rustc : & Path ,
302
+ config : & Config ,
300
303
) -> CargoResult < u64 > {
301
304
let mut hasher = StableHasher :: new ( ) ;
302
305
@@ -330,8 +333,8 @@ fn rustc_fingerprint(
330
333
let maybe_rustup = rustup_rustc == rustc;
331
334
match (
332
335
maybe_rustup,
333
- env :: var ( "RUSTUP_HOME" ) ,
334
- env :: var ( "RUSTUP_TOOLCHAIN" ) ,
336
+ config . get_env ( "RUSTUP_HOME" ) ,
337
+ config . get_env ( "RUSTUP_TOOLCHAIN" ) ,
335
338
) {
336
339
( _, Ok ( rustup_home) , Ok ( rustup_toolchain) ) => {
337
340
debug ! ( "adding rustup info to rustc fingerprint" ) ;
0 commit comments