Skip to content

Commit ad3543d

Browse files
committed
Auto merge of #46563 - michaelwoerister:make-anon-globals-private, r=alexcrichton
Make CGU-local globals private so they don't show up in the local symbol table. Should reduce binary sizes. Great find, @eddyb! r? @alexcrichton (I have not tested this locally. Better wait for travis to turn green before approving)
2 parents ab79caa + 0bfc2b9 commit ad3543d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn addr_of_mut(ccx: &CrateContext,
7474
});
7575
llvm::LLVMSetInitializer(gv, cv);
7676
set_global_alignment(ccx, gv, align);
77-
llvm::LLVMRustSetLinkage(gv, llvm::Linkage::InternalLinkage);
77+
llvm::LLVMRustSetLinkage(gv, llvm::Linkage::PrivateLinkage);
7878
SetUnnamedAddr(gv, true);
7979
gv
8080
}

0 commit comments

Comments
 (0)