[all-commits] [llvm/llvm-project] 2f8fdb: [lld][ELF] Support virtual filesystems for library...
Chinmay Deshpande via All-commits
all-commits at lists.llvm.org
Thu Sep 24 15:37:38 PDT 2026
Branch: refs/heads/users/chinmaydd/lld-elf-vfs
Home: https://github.com/llvm/llvm-project
Commit: 2f8fdbee36e170a8992fb64bd4b6afa1de54916d
https://github.com/llvm/llvm-project/commit/2f8fdbee36e170a8992fb64bd4b6afa1de54916d
Author: Chinmay Deshpande <chdeshpa at amd.com>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M lld/COFF/Driver.cpp
M lld/Common/DriverDispatcher.cpp
M lld/Common/Reproduce.cpp
M lld/ELF/BPSectionOrderer.cpp
M lld/ELF/Config.h
M lld/ELF/Driver.cpp
M lld/ELF/Driver.h
M lld/ELF/DriverUtils.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/LTO.cpp
M lld/ELF/ScriptLexer.cpp
M lld/ELF/ScriptParser.cpp
M lld/MachO/Driver.cpp
M lld/MinGW/Driver.cpp
M lld/docs/NewLLD.md
M lld/docs/ReleaseNotes.md
M lld/include/lld/Common/BPSectionOrdererBase.inc
M lld/include/lld/Common/Driver.h
M lld/include/lld/Common/Reproduce.h
M lld/tools/lld/lld.cpp
M lld/unittests/AsLibAll/AllDrivers.cpp
M lld/unittests/AsLibELF/CMakeLists.txt
A lld/unittests/AsLibELF/VirtualFileSystem.cpp
M lld/wasm/Driver.cpp
M llvm/include/llvm/LTO/Config.h
M llvm/lib/LTO/LTO.cpp
M llvm/lib/LTO/LTOBackend.cpp
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Passes/PassRegistry.def
M llvm/unittests/CMakeLists.txt
A llvm/unittests/LTO/CMakeLists.txt
A llvm/unittests/LTO/VirtualFileSystemTest.cpp
Log Message:
-----------
[lld][ELF] Support virtual filesystems for library inputs
Allow ELF library callers to supply an `llvm::vfs::FileSystem` to
`lld::lldMain`. Use it for objects, bitcode, regular and thin archives,
linker scripts, response files, library searches, and IR-level LTO profiles.
This enables embedded users such as AMD COMGR to avoid staging linker inputs
on disk. For example, COMGR's `linkToRelocatable` writes in-memory data
objects to temporary files before calling `linkWithLLD`. A COMGR follow-up
can instead expose those buffers through an `InMemoryFileSystem` and pass
it to `lldMain`.
Retain the filesystem for the invocation and preserve logical filenames when
backing buffers have different identifiers, including during ThinLTO imports.
Profile loading and sample-profile cache-key reads use the supplied
filesystem.
Calls that omit the filesystem retain their existing behavior. The shared
`lld::Driver` callback gains a filesystem argument; non-ELF drivers reject
a non-null filesystem. Outputs, persistent caches, native plugins, and
machine-code profiles continue to use the host filesystem. Inputs consumed
by external tools must remain accessible to those tools.
Validation:
- LLD suite: 2,101 passed, 1,177 unsupported.
- LLVM LTO and profile suites: 686 passed, 26 unsupported.
- Two new LLVM regression tests cover ThinLTO module identifiers and VFS
sample profiles in custom pass pipelines; both reproduced failures before
the fixes and pass afterward.
- `git-clang-format` and `git diff --check` are clean.
Change-Id: If84a752b180c207274da8ac8b018470eebb51e6f
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list