Add crate compiler_builtins
to LTO even if the Linkage
is IncludedFromDylib
This commit is contained in:
parent
d047968462
commit
8d69a1e69e
1 changed files with 8 additions and 2 deletions
|
@ -268,8 +268,14 @@ pub fn each_linked_rlib(
|
||||||
|
|
||||||
for &cnum in crates {
|
for &cnum in crates {
|
||||||
match fmts.get(cnum.as_usize() - 1) {
|
match fmts.get(cnum.as_usize() - 1) {
|
||||||
Some(&Linkage::NotLinked | &Linkage::Dynamic | &Linkage::IncludedFromDylib) => continue,
|
Some(&Linkage::NotLinked | &Linkage::Dynamic) => continue,
|
||||||
Some(_) => {}
|
Some(&Linkage::IncludedFromDylib) => {
|
||||||
|
// We always link crate `compiler_builtins` statically. When enabling LTO, we include it as well.
|
||||||
|
if info.compiler_builtins != Some(cnum) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Some(&Linkage::Static) => {}
|
||||||
None => return Err(errors::LinkRlibError::MissingFormat),
|
None => return Err(errors::LinkRlibError::MissingFormat),
|
||||||
}
|
}
|
||||||
let crate_name = info.crate_name[&cnum];
|
let crate_name = info.crate_name[&cnum];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue