mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
librustc: Respect #[link_name] on extern statics. Fixes #9270
This commit is contained in:
parent
72e7c62ec4
commit
1ce657aa1f
@ -2641,7 +2641,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
|
||||
foreign::register_foreign_item_fn(ccx, abis, &path, ni)
|
||||
}
|
||||
ast::foreign_item_static(*) => {
|
||||
let ident = token::ident_to_str(&ni.ident);
|
||||
let ident = foreign::link_name(ccx, ni);
|
||||
let g = do ident.with_c_str |buf| {
|
||||
unsafe {
|
||||
let ty = type_of(ccx, ty);
|
||||
|
Loading…
Reference in New Issue
Block a user