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 a72e20d773
commit e1f039f562

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));
}