Skip to content

Commit

Permalink
Do not use deprecated -Zsymbol-mangling-version in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol authored and Mark-Simulacrum committed Jan 4, 2022
1 parent 2b681ac commit e266cb9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,20 @@ impl<'a> Builder<'a> {
}
};

if use_new_symbol_mangling {
rustflags.arg("-Zsymbol-mangling-version=v0");
// cfg(bootstrap) -- drop the compiler.stage == 0 branch.
if compiler.stage == 0 {
if use_new_symbol_mangling {
rustflags.arg("-Zsymbol-mangling-version=v0");
} else {
rustflags.arg("-Zsymbol-mangling-version=legacy");
}
} else {
rustflags.arg("-Zsymbol-mangling-version=legacy");
if use_new_symbol_mangling {
rustflags.arg("-Csymbol-mangling-version=v0");
} else {
rustflags.arg("-Csymbol-mangling-version=legacy");
rustflags.arg("-Zunstable-options");
}
}

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

0 comments on commit e266cb9

Please sign in to comment.