[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 18:31:18 PST 2025


================
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) {
   }
 }
 
+namespace dtlto {
+// Check if an archive file is a thin archive.
+bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) {
----------------
bd1976bris wrote:

Thanks. However, I think that these should just be static functions now and the namespace is unnecessary. 

It would be interesting to get your ideas about this area of the code. Currently, `isThinArchive` checks the magic number at the start of the archive file to determine if it is a thin archive - that is because: 1. ELF LLD doesn't record whether an archive is thin or not and 2. I wanted to add the minimum code to LLD for now and then address this properly this once the design of DTLTO was agreed. Perhaps the archive type could be recorded in `InputFile`s?

https://github.com/llvm/llvm-project/pull/126654


More information about the llvm-commits mailing list