-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Description
For a Multicall toolchain executable, the DTLTO code in the Clang driver does not invoke the linker correctly. See: #159050.
Currently, we pass the Clang executable to LLD for DTLTO via the --thinlto-remote-compiler=
option, where the value is derived from getClangProgramPath()
. However, for a Multicall executable this invokes llvm.exe
. This can be seen from -###
output for a Multicall clang.exe
, which shows <build path>\llvm.exe clang.exe ....
For DTLTO we should not use getClangProgramPath()
(which returns the path to the actual executable). Instead, we likely want some combination of the public members of Driver, Name and Dir (hopefully..) to invoke LLD with --thinlto-remote-compiler=<path>\clang.exe
or possibly --thinlto-remote-compiler=<path>\llvm.exe
--thinlto-remote-compiler-arg=clang
.