Re-add -Zsymbol-mangling-version=v0.

This commit is contained in:
Eduard-Mihai Burtescu 2021-08-27 21:16:26 +03:00 committed by Eduard-Mihai Burtescu
parent 8d9e14a0a3
commit 6807c5973d
5 changed files with 7 additions and 6 deletions

4
Cargo.lock generated
View File

@ -2226,9 +2226,9 @@ dependencies = [
[[package]]
name = "rustc-demangle"
version = "0.1.20"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49"
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustc-hash"

View File

@ -39,7 +39,7 @@ ar = "0.9.0"
bimap = "0.6"
indexmap = "1.6.0"
rspirv = "0.10"
rustc-demangle = "0.1.18"
rustc-demangle = "0.1.21"
sanitize-filename = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -394,8 +394,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
let mut rustflags = vec![
format!("-Zcodegen-backend={}", rustc_codegen_spirv.display()),
//FIXME: reintroduce v0 mangling, see issue #642
"-Zsymbol-mangling-version=legacy".to_string(),
"-Zsymbol-mangling-version=v0".to_string(),
];
let mut llvm_args = vec![];

View File

@ -292,6 +292,7 @@ struct TestDeps {
}
/// The RUSTFLAGS passed to all SPIR-V builds.
// FIXME(eddyb) expose most of these from `spirv-builder`.
fn rust_flags(codegen_backend_path: &Path) -> String {
[
&*format!("-Zcodegen-backend={}", codegen_backend_path.display()),
@ -300,6 +301,7 @@ fn rust_flags(codegen_backend_path: &Path) -> String {
"-Cdebuginfo=2",
"-Cembed-bitcode=no",
"-Ctarget-feature=+Int8,+Int16,+Int64,+Float64",
"-Zsymbol-mangling-version=v0",
]
.join(" ")
}

View File

@ -7,7 +7,7 @@ OpMemoryModel Logical Simple
OpEntryPoint Fragment %1 "main"
OpExecutionMode %1 OriginUpperLeft
%2 = OpString "$OPSTRING_FILENAME/generic-fn-op-name.rs"
OpName %3 "generic_fn_op_name::generic"
OpName %3 "generic_fn_op_name::generic::<f32, {spirv_types::image_params::Dimensionality::TwoD}>"
OpName %4 "generic_fn_op_name::main"
%5 = OpTypeVoid
%6 = OpTypeFunction %5