From bb634f3c886673ca7785c9c9bf72cec5c3258641 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 21 Aug 2019 14:57:12 +0200 Subject: [PATCH] Always use Linkage::Import for relocations targeting a static --- src/constant.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/constant.rs b/src/constant.rs index 960097f2d13..d1e09cb5239 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -321,8 +321,7 @@ fn define_all_allocs( // 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, // 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) + data_id_for_static(tcx, module, def_id, Linkage::Import) } };