Skip to content

Commit 6acb704

Browse files
authored
Rollup merge of #92825 - pierwill:rustc-version-force-rename, r=Mark-Simulacrum
Rename environment variable for overriding rustc version
2 parents 51aa20d + 68515cb commit 6acb704

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

compiler/rustc_incremental/src/persist/file_format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ fn report_format_mismatch(report_incremental_info: bool, file: &Path, message: &
190190

191191
fn rustc_version(nightly_build: bool) -> String {
192192
if nightly_build {
193-
if let Some(val) = env::var_os("RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER") {
193+
if let Some(val) = env::var_os("RUSTC_FORCE_RUSTC_VERSION") {
194194
return val.to_string_lossy().into_owned();
195195
}
196196
}

compiler/rustc_span/src/def_id.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ impl StableCrateId {
176176
// and no -Cmetadata, symbols from the same crate compiled with different versions of
177177
// rustc are named the same.
178178
//
179-
// RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER is used to inject rustc version information
179+
// RUSTC_FORCE_RUSTC_VERSION is used to inject rustc version information
180180
// during testing.
181-
if let Some(val) = std::env::var_os("RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER") {
181+
if let Some(val) = std::env::var_os("RUSTC_FORCE_RUSTC_VERSION") {
182182
hasher.write(val.to_string_lossy().into_owned().as_bytes())
183183
} else {
184184
hasher.write(option_env!("CFG_VERSION").unwrap_or("unknown version").as_bytes());

src/test/incremental/cache_file_headers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// The `l33t haxx0r` Rust compiler is known to produce incr. comp. artifacts
99
// that are outrageously incompatible with just about anything, even itself:
10-
//[rpass1] rustc-env:RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER="l33t haxx0r rustc 2.1 LTS"
10+
//[rpass1] rustc-env:RUSTC_FORCE_RUSTC_VERSION="l33t haxx0r rustc 2.1 LTS"
1111

1212
// revisions:rpass1 rpass2
1313
// compile-flags: -Z query-dep-graph

src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ all:
2727
$(RUSTC) b.rs --extern a=$(TMPDIR)/liba$(EXT) --crate-type=bin -Crpath $(FLAGS)
2828
$(call RUN,b)
2929
# Now re-compile a.rs with another rustc version
30-
RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER=deadfeed $(RUSTC) a.rs --crate-type=dylib $(FLAGS)
30+
RUSTC_FORCE_RUSTC_VERSION=deadfeed $(RUSTC) a.rs --crate-type=dylib $(FLAGS)
3131
# After compiling with a different rustc version, write symbols to disk again.
3232
$(NM_CMD) $(call DYLIB,a) > $(TMPDIR)/symbolsafter
3333
# As a sanity check, test if the symbols changed:

0 commit comments

Comments
 (0)