Skip to content

Commit e266cb9

Browse files
KobzolMark-Simulacrum
authored andcommitted
Do not use deprecated -Zsymbol-mangling-version in bootstrap
1 parent 2b681ac commit e266cb9

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/bootstrap/builder.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -988,10 +988,20 @@ impl<'a> Builder<'a> {
988988
}
989989
};
990990

991-
if use_new_symbol_mangling {
992-
rustflags.arg("-Zsymbol-mangling-version=v0");
991+
// cfg(bootstrap) -- drop the compiler.stage == 0 branch.
992+
if compiler.stage == 0 {
993+
if use_new_symbol_mangling {
994+
rustflags.arg("-Zsymbol-mangling-version=v0");
995+
} else {
996+
rustflags.arg("-Zsymbol-mangling-version=legacy");
997+
}
993998
} else {
994-
rustflags.arg("-Zsymbol-mangling-version=legacy");
999+
if use_new_symbol_mangling {
1000+
rustflags.arg("-Csymbol-mangling-version=v0");
1001+
} else {
1002+
rustflags.arg("-Csymbol-mangling-version=legacy");
1003+
rustflags.arg("-Zunstable-options");
1004+
}
9951005
}
9961006

9971007
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,

0 commit comments

Comments
 (0)