[clang] [lld] [llvm] [clang][lld] Dispatch registered linkers through ToolSession (PR #224023)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 19:34:18 PST 2026
MaskRay wrote:
I still hold the position from the RFC (https://discourse.llvm.org/t/rfc-embeddable-llvm-tool-drivers-for-long-lived-hosts/91754/18): lld is not a long-lived in-process linker, and clang should keep spawning the linker as a separate process, including for wasm.
The session path also keeps `if (!r.canRunAgain) exitLld(r.retCode)`. Called from clang, that terminates the host from inside `clang_main`, skipping temporary-file cleanup and the "linker command failed" diagnostic. As noted in the RFC, `canRunAgain` exists so the tests can check for state leaks between runs; it is not a recovery contract.
https://github.com/llvm/llvm-project/pull/224023
More information about the cfe-commits
mailing list