Skip to content

Commit

Permalink
Re-add -Zsymbol-mangling-version=v0.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Aug 30, 2021
1 parent b113b71 commit 5f787c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/rustc_codegen_spirv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions crates/spirv-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,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![];
Expand Down
2 changes: 2 additions & 0 deletions tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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(" ")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/dis/generic-fn-op-name.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5f787c1

Please sign in to comment.