Restore #![no_builtins]
crates participation in LTO.
After #113716, we can make `#![no_builtins]` crates participate in LTO again. `#![no_builtins]` with LTO does not result in undefined references to the error.
This commit is contained in:
parent
e20cb77021
commit
520081721c
8 changed files with 108 additions and 58 deletions
|
@ -885,9 +885,7 @@ impl CrateInfo {
|
|||
// If global LTO is enabled then almost everything (*) is glued into a single object file,
|
||||
// so this logic is not necessary and can cause issues on some targets (due to weak lang
|
||||
// item symbols being "privatized" to that object file), so we disable it.
|
||||
// (*) Native libs, and `#[compiler_builtins]` and `#[no_builtins]` crates are not glued,
|
||||
// and we assume that they cannot define weak lang items. This is not currently enforced
|
||||
// by the compiler, but that's ok because all this stuff is unstable anyway.
|
||||
// (*) Native libs are not glued, and we assume that they cannot define weak lang items.
|
||||
let target = &tcx.sess.target;
|
||||
if !are_upstream_rust_objects_already_included(tcx.sess) {
|
||||
let missing_weak_lang_items: FxHashSet<Symbol> = info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue