Always use Linkage::Import for relocations targeting a static

This commit is contained in:
bjorn3 2019-08-21 14:57:12 +02:00
parent e64da833c9
commit bb634f3c88

View File

@ -321,8 +321,7 @@ fn define_all_allocs(
// Don't push a `TodoItem::Static` here, as it will cause statics used by // Don't push a `TodoItem::Static` here, as it will cause statics used by
// multiple crates to be duplicated between them. It isn't necessary anyway, // multiple crates to be duplicated between them. It isn't necessary anyway,
// as it will get pushed by `codegen_static` when necessary. // as it will get pushed by `codegen_static` when necessary.
let linkage = crate::linkage::get_static_ref_linkage(tcx, def_id); data_id_for_static(tcx, module, def_id, Linkage::Import)
data_id_for_static(tcx, module, def_id, linkage)
} }
}; };