Skip to content

Commit b235273

Browse files
Replace -Z default-hidden-visibility with -Z default-visibility
MCP: rust-lang/compiler-team#782 Co-authored-by: bjorn3 <[email protected]>
1 parent ce09fbf commit b235273

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/allocator.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,17 @@ fn create_wrapper_function(
104104
false,
105105
);
106106

107-
if tcx.sess.default_hidden_visibility() {
108-
#[cfg(feature = "master")]
109-
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden));
107+
#[cfg(feature = "master")]
108+
match tcx.sess.default_visibility() {
109+
rustc_target::spec::SymbolVisibility::Hidden => {
110+
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden))
111+
}
112+
rustc_target::spec::SymbolVisibility::Protected => {
113+
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Protected))
114+
}
115+
rustc_target::spec::SymbolVisibility::Interposable => {}
110116
}
117+
111118
if tcx.sess.must_emit_unwind_tables() {
112119
// TODO(antoyo): emit unwind tables.
113120
}

0 commit comments

Comments
 (0)