about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorThe 8472 <git@infinite-source.de>2021-12-28 19:05:03 +0100
committerThe 8472 <git@infinite-source.de>2022-01-21 00:28:07 +0100
commit8985e5ee825a2fb1e5eb2050f0b3fd8e2913d322 (patch)
tree11e0fd38503696d5f20d8bfaa089a49f7d228dee /src/bootstrap
parent74fbbefea8d13683cca5eee62e4740706cb3144a (diff)
downloadrust-8985e5ee825a2fb1e5eb2050f0b3fd8e2913d322.tar.gz
rust-8985e5ee825a2fb1e5eb2050f0b3fd8e2913d322.zip
Override rustc version in ui and mir-opt tests to get stable hashes
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles.
Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so
no test-dependent normalization is needed. Hashes for the standard library still change so some
normalizations are still needed.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/test.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index cb1b0ebf8db..176c06114e0 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1540,6 +1540,9 @@ note: if you're sure you want to do this, please open an issue as to why. In the
             }
         }
         cmd.env("RUSTC_BOOTSTRAP", "1");
+        // Override the rustc version used in symbol hashes to reduce the amount of normalization
+        // needed when diffing test output.
+        cmd.env("RUSTC_FORCE_RUSTC_VERSION", "compiletest");
         cmd.env("DOC_RUST_LANG_ORG_CHANNEL", builder.doc_rust_lang_org_channel());
         builder.add_rust_test_threads(&mut cmd);