Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ impl Options {
}

pub fn get_symbol_mangling_version(&self) -> SymbolManglingVersion {
self.cg.symbol_mangling_version.unwrap_or(SymbolManglingVersion::Legacy)
self.cg.symbol_mangling_version.unwrap_or(SymbolManglingVersion::V0)
}
}

Expand Down
22 changes: 1 addition & 21 deletions src/bootstrap/src/core/builder/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,22 +578,6 @@ impl Builder<'_> {
rustflags.arg(sysroot_str);
}

let use_new_symbol_mangling = match self.config.rust_new_symbol_mangling {
Some(setting) => {
// If an explicit setting is given, use that
setting
}
None => {
if mode == Mode::Std {
// The standard library defaults to the legacy scheme
false
} else {
// The compiler and tools default to the new scheme
true
}
}
};

// By default, windows-rs depends on a native library that doesn't get copied into the
// sysroot. Passing this cfg enables raw-dylib support instead, which makes the native
// library unnecessary. This can be removed when windows-rs enables raw-dylib
Expand All @@ -602,11 +586,7 @@ impl Builder<'_> {
rustflags.arg("--cfg=windows_raw_dylib");
}

if use_new_symbol_mangling {
rustflags.arg("-Csymbol-mangling-version=v0");
} else {
rustflags.arg("-Csymbol-mangling-version=legacy");
}
rustflags.arg("-Csymbol-mangling-version=v0");

// FIXME: the following components don't build with `-Zrandomize-layout` yet:
// - rust-analyzer, due to the rowan crate
Expand Down
Loading