Skip to content

Commit ff94b3b

Browse files
committed
Update references to -Z symbol-mangling-version to use -C
Replace `-Z symbol-mangling-version=v0` with `-C symbol-mangling-version=v0`. Replace `-Z symbol-mangling-version=legacy` with `-Z unstable-options -C symbol-mangling-version=legacy`.
1 parent bbf4b66 commit ff94b3b

File tree

25 files changed

+34
-34
lines changed

25 files changed

+34
-34
lines changed

Diff for: compiler/rustc_codegen_gcc/config.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
3838
fi
3939
fi
4040

41-
export RUSTFLAGS="$linker -Cpanic=abort -Zsymbol-mangling-version=v0 -Cdebuginfo=2 -Clto=off -Zpanic-abort-tests -Zcodegen-backend=$(pwd)/target/${CHANNEL:-debug}/librustc_codegen_gcc.$dylib_ext --sysroot $(pwd)/build_sysroot/sysroot"
41+
export RUSTFLAGS="$linker -Cpanic=abort -Csymbol-mangling-version=v0 -Cdebuginfo=2 -Clto=off -Zpanic-abort-tests -Zcodegen-backend=$(pwd)/target/${CHANNEL:-debug}/librustc_codegen_gcc.$dylib_ext --sysroot $(pwd)/build_sysroot/sysroot"
4242

4343
# FIXME(antoyo): remove once the atomic shim is gone
4444
if [[ `uname` == 'Darwin' ]]; then

Diff for: compiler/rustc_codegen_gcc/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ EOF
183183
git checkout src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
184184
rm src/test/ui/llvm-asm/llvm-asm-in-out-operand.rs || true # TODO(antoyo): Enable back this test if I ever implement the llvm_asm! macro.
185185

186-
RUSTC_ARGS="-Zpanic-abort-tests -Zsymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort"
186+
RUSTC_ARGS="-Zpanic-abort-tests -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort"
187187

188188
echo "[TEST] rustc test suite"
189189
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 src/test/ui/ --rustc-args "$RUSTC_ARGS"

Diff for: compiler/rustc_session/src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ options! {
12301230
instrument_coverage: Option<InstrumentCoverage> = (None, parse_instrument_coverage, [TRACKED],
12311231
"instrument the generated code to support LLVM source-based code coverage \
12321232
reports (note, the compiler build config must include `profiler = true`); \
1233-
implies `-Z symbol-mangling-version=v0`. Optional values are:
1233+
implies `-C symbol-mangling-version=v0`. Optional values are:
12341234
`=all` (implicit value)
12351235
`=except-unused-generics`
12361236
`=except-unused-functions`

Diff for: compiler/rustc_symbol_mangling/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ fn compute_symbol_name<'tcx>(
237237

238238
// Pick the crate responsible for the symbol mangling version, which has to:
239239
// 1. be stable for each instance, whether it's being defined or imported
240-
// 2. obey each crate's own `-Z symbol-mangling-version`, as much as possible
240+
// 2. obey each crate's own `-C symbol-mangling-version`, as much as possible
241241
// We solve these as follows:
242242
// 1. because symbol names depend on both `def_id` and `instantiating_crate`,
243243
// both their `CrateNum`s are stable for any given instance, so we can pick

Diff for: src/doc/unstable-book/src/compiler-flags/instrument-coverage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When running a coverage-instrumented program, the counter values are written to
2727
[`llvm.instrprof.increment`]: https://llvm.org/docs/LangRef.html#llvm-instrprof-increment-intrinsic
2828
[llvm code coverage mapping format]: https://llvm.org/docs/CoverageMappingFormat.html
2929

30-
> **Note**: `-Z instrument-coverage` also automatically enables `-Z symbol-mangling-version=v0` (tracking issue [#60705]). The `v0` symbol mangler is strongly recommended, but be aware that this demangler is also experimental. The `v0` demangler can be overridden by explicitly adding `-Z symbol-mangling-version=legacy`.
30+
> **Note**: `-Z instrument-coverage` also automatically enables `-C symbol-mangling-version=v0` (tracking issue [#60705]). The `v0` symbol mangler is strongly recommended, but be aware that this demangler is also experimental. The `v0` demangler can be overridden by explicitly adding `-Z unstable-options -C symbol-mangling-version=legacy`.
3131
3232
[#60705]: https://github.com/rust-lang/rust/issues/60705
3333

Diff for: src/test/codegen/inline-hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Checks that closures, constructors, and shims except
22
// for a drop glue receive inline hint by default.
33
//
4-
// compile-flags: -Cno-prepopulate-passes -Zsymbol-mangling-version=v0
4+
// compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0
55
#![crate_type = "lib"]
66

77
pub fn f() {

Diff for: src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# and will probably get removed once `legacy` is gone.
99

1010
all:
11-
$(RUSTC) a.rs --cfg x -C prefer-dynamic -Z symbol-mangling-version=legacy
12-
$(RUSTC) b.rs -C prefer-dynamic -Z symbol-mangling-version=legacy
11+
$(RUSTC) a.rs --cfg x -C prefer-dynamic -Z unstable-options -C symbol-mangling-version=legacy
12+
$(RUSTC) b.rs -C prefer-dynamic -Z unstable-options -C symbol-mangling-version=legacy
1313
$(call RUN,b)
14-
$(RUSTC) a.rs --cfg y -C prefer-dynamic -Z symbol-mangling-version=legacy
14+
$(RUSTC) a.rs --cfg y -C prefer-dynamic -Z unstable-options -C symbol-mangling-version=legacy
1515
$(call FAIL,b)

Diff for: src/test/run-make-fulldeps/share-generics-dylib/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
-include ../../run-make-fulldeps/tools.mk
1313

14-
COMMON_ARGS=-Cprefer-dynamic -Zshare-generics=yes -Ccodegen-units=1 -Zsymbol-mangling-version=v0
14+
COMMON_ARGS=-Cprefer-dynamic -Zshare-generics=yes -Ccodegen-units=1 -Csymbol-mangling-version=v0
1515

1616
all:
1717
$(RUSTC) instance_provider_a.rs $(COMMON_ARGS) --crate-type=rlib

Diff for: src/test/ui/lifetimes/issue-84604.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags: -Zsymbol-mangling-version=v0
2+
// compile-flags: -Csymbol-mangling-version=v0
33

44
pub fn f<T: ?Sized>() {}
55
pub trait Frob<T: ?Sized> {}

Diff for: src/test/ui/panics/issue-47429-short-backtraces.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
// NOTE(eddyb) output differs between symbol mangling schemes
1616
// revisions: legacy v0
17-
// [legacy] compile-flags: -Zsymbol-mangling-version=legacy
18-
// [v0] compile-flags: -Zsymbol-mangling-version=v0
17+
// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy
18+
// [v0] compile-flags: -Csymbol-mangling-version=v0
1919

2020
fn main() {
2121
panic!()

Diff for: src/test/ui/polymorphization/closure_in_upvar/fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0
2+
// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0
33

44
fn foo(f: impl Fn()) {
55
let x = |_: ()| ();

Diff for: src/test/ui/polymorphization/closure_in_upvar/fnmut.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0
2+
// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0
33

44
fn foo(f: impl Fn()) {
55
// Mutate an upvar from `x` so that it implements `FnMut`.

Diff for: src/test/ui/polymorphization/closure_in_upvar/fnonce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0
2+
// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0
33

44
fn foo(f: impl Fn()) {
55
// Move a non-copy type into `x` so that it implements `FnOnce`.

Diff for: src/test/ui/polymorphization/closure_in_upvar/other.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags:-Zpolymorphize=on -Zsymbol-mangling-version=v0
2+
// compile-flags:-Zpolymorphize=on -Csymbol-mangling-version=v0
33

44
fn y_uses_f(f: impl Fn()) {
55
let x = |_: ()| ();

Diff for: src/test/ui/polymorphization/symbol-ambiguity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-pass
2-
// compile-flags: -Zpolymorphize=on -Zsymbol-mangling-version=v0
2+
// compile-flags: -Zpolymorphize=on -Csymbol-mangling-version=v0
33

44
pub(crate) struct Foo<'a, I, E>(I, &'a E);
55

Diff for: src/test/ui/symbol-names/basic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-fail
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy
4+
//[v0]compile-flags: -C symbol-mangling-version=v0
55

66
#![feature(rustc_attrs)]
77

Diff for: src/test/ui/symbol-names/const-generics-demangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-fail
2-
// compile-flags: -Z symbol-mangling-version=v0 --crate-name=c
2+
// compile-flags: -C symbol-mangling-version=v0 --crate-name=c
33
// normalize-stderr-test: "c\[.*?\]" -> "c[HASH]"
44
#![feature(rustc_attrs)]
55

Diff for: src/test/ui/symbol-names/const-generics-str-demangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-fail
2-
// compile-flags: -Z symbol-mangling-version=v0 --crate-name=c
2+
// compile-flags: -C symbol-mangling-version=v0 --crate-name=c
33
// normalize-stderr-test: "c\[.*?\]" -> "c[HASH]"
44
#![feature(adt_const_params, rustc_attrs)]
55
#![allow(incomplete_features)]

Diff for: src/test/ui/symbol-names/const-generics-structural-demangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-fail
2-
// compile-flags: -Z symbol-mangling-version=v0 --crate-name=c
2+
// compile-flags: -C symbol-mangling-version=v0 --crate-name=c
33

44
// NOTE(eddyb) we need `core` for `core::option::Option`, normalize away its
55
// disambiguator hash, which can/should change (including between stage{1,2}).

Diff for: src/test/ui/symbol-names/const-generics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check-pass
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib
4+
//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib
55

66
// `char`
77
pub struct Char<const F: char>;

Diff for: src/test/ui/symbol-names/impl1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-fail
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy
4+
//[v0]compile-flags: -C symbol-mangling-version=v0
55
//[legacy]normalize-stderr-test: "h[\w]{16}E?\)" -> "<SYMBOL_HASH>)"
66

77
#![feature(auto_traits, rustc_attrs)]

Diff for: src/test/ui/symbol-names/issue-60925.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-fail
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy
4+
//[v0]compile-flags: -C symbol-mangling-version=v0
55

66
#![feature(rustc_attrs)]
77

Diff for: src/test/ui/symbol-names/issue-75326.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// build-fail
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy
4+
//[v0]compile-flags: -C symbol-mangling-version=v0
55
//[legacy]normalize-stderr-test: "h[\w{16}]+" -> "SYMBOL_HASH"
66

77
#![feature(rustc_attrs)]

Diff for: src/test/ui/symbol-names/issue-76365.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check-pass
22
// revisions: legacy v0
3-
//[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib
4-
//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib
3+
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib
4+
//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib
55

66

77
pub struct Bar<const F: bool>;

Diff for: src/test/ui/symbol-names/trait-objects.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// build-fail
44
// revisions: v0
5-
//[v0]compile-flags: -Z symbol-mangling-version=v0
5+
//[v0]compile-flags: -C symbol-mangling-version=v0
66
//[v0]normalize-stderr-test: "core\[.*?\]" -> "core[HASH]"
77

88
#![feature(rustc_attrs)]

0 commit comments

Comments
 (0)