From 5f787c17ef23ab89af2969d8a1d3822c955add7b Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 27 Aug 2021 21:16:26 +0300 Subject: [PATCH] Re-add `-Zsymbol-mangling-version=v0`. --- Cargo.lock | 4 ++-- crates/rustc_codegen_spirv/Cargo.toml | 2 +- crates/spirv-builder/src/lib.rs | 3 +-- tests/src/main.rs | 2 ++ tests/ui/dis/generic-fn-op-name.stderr | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c180cad52..1d3b58afae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/crates/rustc_codegen_spirv/Cargo.toml b/crates/rustc_codegen_spirv/Cargo.toml index 44628f5e09..fa9495c42f 100644 --- a/crates/rustc_codegen_spirv/Cargo.toml +++ b/crates/rustc_codegen_spirv/Cargo.toml @@ -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" diff --git a/crates/spirv-builder/src/lib.rs b/crates/spirv-builder/src/lib.rs index 825c02b21f..ada9b4ed2c 100644 --- a/crates/spirv-builder/src/lib.rs +++ b/crates/spirv-builder/src/lib.rs @@ -391,8 +391,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result { 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![]; diff --git a/tests/src/main.rs b/tests/src/main.rs index 63ff4d16ff..1f32608c4c 100644 --- a/tests/src/main.rs +++ b/tests/src/main.rs @@ -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(" ") } diff --git a/tests/ui/dis/generic-fn-op-name.stderr b/tests/ui/dis/generic-fn-op-name.stderr index e8b5b86d0e..7728d0ee7a 100644 --- a/tests/ui/dis/generic-fn-op-name.stderr +++ b/tests/ui/dis/generic-fn-op-name.stderr @@ -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::" OpName %4 "generic_fn_op_name::main" %5 = OpTypeVoid %6 = OpTypeFunction %5