[lld] [llvm] [DTLTO] support distributing bitcode from FatLTO objects (PR #176928)
Ben Dunbobbin via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 02:24:10 PST 2026
================
@@ -134,15 +132,17 @@ lto::DTLTO::addInput(std::unique_ptr<lto::InputFile> InputPtr) {
StringRef ModuleId = Input->getName();
StringRef ArchivePath = Input->getArchivePath();
- // Only process archive members.
- if (ArchivePath.empty())
+ // Only process archive members and FatLTO objects.
+ if (ArchivePath.empty() && !Input->isFatLTOObject())
return Input;
SmallString<64> NewModuleId;
BitcodeModule &BM = Input->getPrimaryBitcodeModule();
- // Check if the archive is a thin archive.
- Expected<bool> IsThin = isThinArchive(ArchivePath);
+ // Check if the archive is a thin archive and the object is not fat.
+ // This means we have a file already that we can point to.
+ Expected<bool> IsThin =
+ Input->isFatLTOObject() ? false : isThinArchive(ArchivePath);
----------------
bd1976bris wrote:
```suggestion
// For a member of a thin archive that is not a FatLTO object, there is an existing
// file on disk that can be used, so we can avoid having to materialize.
Expected<bool> UseThinMember =
Input->isFatLTOObject() ? false : isThinArchive(ArchivePath);
```
https://github.com/llvm/llvm-project/pull/176928
More information about the llvm-commits
mailing list