mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 14:02:06 +03:00
rustc_trans: use internal linkage instead of private to work around linker bugs.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
use back::abi;
|
||||
use llvm;
|
||||
use llvm::{ConstFCmp, ConstICmp, SetLinkage, SetUnnamedAddr};
|
||||
use llvm::{PrivateLinkage, ValueRef, Bool, True};
|
||||
use llvm::{InternalLinkage, ValueRef, Bool, True};
|
||||
use middle::{check_const, const_eval, def};
|
||||
use trans::{adt, closure, debuginfo, expr, inline, machine};
|
||||
use trans::base::{self, push_ctxt};
|
||||
@@ -103,7 +103,7 @@ fn addr_of_mut(ccx: &CrateContext,
|
||||
let gv = llvm::LLVMAddGlobal(ccx.llmod(), val_ty(cv).to_ref(),
|
||||
name.as_ptr() as *const _);
|
||||
llvm::LLVMSetInitializer(gv, cv);
|
||||
SetLinkage(gv, PrivateLinkage);
|
||||
SetLinkage(gv, InternalLinkage);
|
||||
SetUnnamedAddr(gv, true);
|
||||
gv
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user