Skip to content

Commit a066e1b

Browse files
authored
Rollup merge of #112722 - DrMeepster:patch-2, r=clubby789
bootstrap: check for dry run when copying env vars for msvc The new synthetic targets for mir-opt blessing aren't added to `builder.cc` during dry runs, causing `x.py test tests/mir-opt --bless` to crash on MSVC when it tries to copy env vars to the C compiler invocation. This PR adds a check for dry run to fix the panic.
2 parents eb40590 + 3078de7 commit a066e1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
17661766
//
17671767
// Note that if we encounter `PATH` we make sure to append to our own `PATH`
17681768
// rather than stomp over it.
1769-
if target.contains("msvc") {
1769+
if !builder.config.dry_run() && target.contains("msvc") {
17701770
for &(ref k, ref v) in builder.cc.borrow()[&target].env() {
17711771
if k != "PATH" {
17721772
cmd.env(k, v);

0 commit comments

Comments
 (0)