Set correct linkage for statics
This commit is contained in:
parent
edbb5730ea
commit
0e35e4ea19
1 changed files with 5 additions and 2 deletions
|
@ -268,8 +268,11 @@ fn define_all_allocs(
|
||||||
_ => bug!("static const eval returned {:#?}", const_),
|
_ => bug!("static const eval returned {:#?}", const_),
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME set correct linkage
|
let data_id = data_id_for_static(tcx, module, def_id, if tcx.is_reachable_non_generic(def_id) {
|
||||||
let data_id = data_id_for_static(tcx, module, def_id, Linkage::Export);
|
Linkage::Export
|
||||||
|
} else {
|
||||||
|
Linkage::Local
|
||||||
|
});
|
||||||
(data_id, alloc)
|
(data_id, alloc)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue