[lld] [RFC][lld][SPIRV] Add support for SPIR-V LTO (PR #178749)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 18 09:50:41 PST 2026


jhuber6 wrote:

> I have a fundamental concern with this approach. This is not really a linker - it's a bitcode -> SPIR-V tool that shells out to an external tool (spirv-link) for the actual linking. Adding a new lld flavor has significant maintenance cost: every change to lld/Common, Driver.h, LLD_ALL_DRIVERS. The closest tool in tree is probably llvm-lto2 instead of lld, which lives in llvm/tools/

Honestly, that might be sufficient for what we're doing here. I haven't used it much, but if it's an interface into an LTO pipeline with basic symbol resolution then it's usable for at least the case where we just go [LLVM-IR] -> SPIR-V. If it doesn't support archives we could probably make it

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


More information about the llvm-commits mailing list