Skip to content

[DTLTO] Clang driver broken with the multicall toolchain executable #159125

@bd1976bris

Description

@bd1976bris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTOLink time optimization (regular/full LTO or ThinLTO)test-suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions