Visibility is an ELF concept and protected visibility is not very well implemented,
avoid using it for now. Instead, mark pairs that are not needed elsewhere as internal.
This commit is contained in:
parent
2ef2bda276
commit
30efdeeca1
@ -7436,9 +7436,12 @@ fn register_fn_pair(&@crate_ctxt cx, str ps, TypeRef llpairty, ValueRef llfn,
|
||||
|
||||
llvm::LLVMSetInitializer(gvar, pair);
|
||||
llvm::LLVMSetGlobalConstant(gvar, True);
|
||||
llvm::LLVMSetVisibility(gvar,
|
||||
lib::llvm::LLVMProtectedVisibility
|
||||
as llvm::Visibility);
|
||||
|
||||
// FIXME: We should also hide the unexported pairs in crates.
|
||||
if (!cx.sess.get_opts().shared) {
|
||||
llvm::LLVMSetLinkage(gvar, lib::llvm::LLVMInternalLinkage
|
||||
as llvm::Linkage);
|
||||
}
|
||||
|
||||
cx.item_ids.insert(id, llfn);
|
||||
cx.item_symbols.insert(id, ps);
|
||||
|
Loading…
Reference in New Issue
Block a user