[DTLTO][ELF][COFF] Add archive support for DTLTO. by kbelochapka · Pull Request #157043 · llvm/llvm-project (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This patch implements support for handling archive members in DTLTO.
Unlike ThinLTO, where archive members are passed as in-memory buffers, DTLTO requires archive members to be materialized as individual files on the filesystem. This is necessary because DTLTO invokes clang externally, which expects file-based inputs. To support this, this implementation identifies archive members among the input files, saves them to the filesystem, and updates their module_id to match their file paths.
…eview comments from Tobias.
kbelochapka changed the title
[DTLTO][ELF][COFF][MachO] Add archive support for DTLTO. [DTLTO][ELF][COFF] Add archive support for DTLTO.
…support from lld/ELF/InputFiles.cpp.
…rt from lld/MachO/InputFiles.cpp for now.
…f(Lto==NULL)' check from TempFilesRemover destructor.
…THIN_ARCHIVE_MAGIC' with object::ThinArchiveMagic.
…Input() a member of lto::LTO class.
…ory overhead for non-DTLTO mode from lto::LTO::add().
…d lto::DTLTO class derived from lto::LTO class.
…tlto flag from lto::LTO class.
… functions and data members private for lto::DTLTO class.