Issue 159125
Summary [DTLTO] Clang driver broken with the multicall toolchain executable
Labels LTO
Assignees
Reporter bd1976bris
    For a Multicall toolchain executable, the DTLTO code in the Clang driver does not invoke the linker correctly. See: https://github.com/llvm/llvm-project/pull/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`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to