don't copy symbols from dylibs with -Zdylib-lto

This commit is contained in:
Rémy Rakic 2022-12-16 20:37:53 +00:00 committed by Mark Rousskov
parent ff4ca95691
commit 0645c3df57

View file

@ -253,7 +253,7 @@ pub fn each_linked_rlib(
};
for &cnum in crates {
match fmts.get(cnum.as_usize() - 1) {
Some(&Linkage::NotLinked | &Linkage::IncludedFromDylib) => continue,
Some(&Linkage::NotLinked | &Linkage::Dynamic | &Linkage::IncludedFromDylib) => continue,
Some(_) => {}
None => return Err(errors::LinkRlibError::MissingFormat),
}