You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we build an rlib compiled with -Clto=fat but use the bitcode in a link using -Clto=thin then we will hit this assertion in thinLTOInternalizeModule:
if (GS == DefinedGlobals.end()) {
// Also check the original non-promoted non-globalized name. In some
// cases a preempted weak value is linked in as a local copy because
// it is referenced by an alias (IRLinker::linkGlobalValueProto).
// In that case, since it was originally not a local value, it was
// recorded in the index using the original name.
// FIXME: This may not be needed once PR27866 is fixed.
GS = DefinedGlobals.find(
GlobalValue::getGUIDAssumingExternalLinkage(OrigName));
assert(GS != DefinedGlobals.end());
}
}
return !GlobalValue::isLocalLinkage(GS->second->linkage());
It appears that when rust is driving the link that it will unconditionally pipe all bitcode through the thin lto pipeline. I believe this is incorrect for these reasons:
Full'fat lto'd bitcode should go through the normal full lto pipeline
Normally this would work if lld drives the link since lld knows how to dispatch which bitcode module goes through which pipeline. We should ensure rust does the same.
(Summarized from https://g-issues.fuchsia.dev/issues/517626589)
If we build an rlib compiled with
-Clto=fatbut use the bitcode in a link using-Clto=thinthen we will hit this assertion inthinLTOInternalizeModule:It appears that when rust is driving the link that it will unconditionally pipe all bitcode through the thin lto pipeline. I believe this is incorrect for these reasons:
Normally this would work if lld drives the link since lld knows how to dispatch which bitcode module goes through which pipeline. We should ensure rust does the same.