1
Fork 0

Add unstable -Zdefault-hidden-visibility cmdline flag for rustc.

The new flag has been described in the Major Change Proposal at
https://github.com/rust-lang/compiler-team/issues/656
This commit is contained in:
Lukasz Anforowicz 2023-12-13 21:14:18 +00:00
parent 56d25ba5ea
commit 981c4e3ce6
10 changed files with 66 additions and 8 deletions

View file

@ -90,7 +90,7 @@ fn create_wrapper_function(
.collect();
let func = context.new_function(None, FunctionType::Exported, output.unwrap_or(void), &args, from_name, false);
if tcx.sess.target.options.default_hidden_visibility {
if tcx.sess.default_hidden_visibility() {
#[cfg(feature="master")]
func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden));
}