[Clang] Fix HIP tests when running on Windows with the LLVM toolchain is in the path
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 23 Mar 2020 20:54:24 +0000 (16:54 -0400)
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 23 Mar 2020 20:54:48 +0000 (16:54 -0400)
commit5896e2df45dab7680be321ee63903431a673817b
tree61640a26b08e0719440be4733376b1f24314ec1e
parent3f533006ba8c8ae6f3596f49f480aa794ed4e347
[Clang] Fix HIP tests when running on Windows with the LLVM toolchain is in the path

On Windows, when the LLVM toolchain is in the current path (%PATH%), fusing the linker yields c:\{path}\lld.exe whereas the hip tests did not expect the .exe part.
This only happens if LLD is not present in the build folder, which consequently makes the code in Driver::GetProgramPath() to fall back to %PATH% and platform-specific search, which includes the .exe part (see https://github.com/llvm/llvm-project/blob/master/clang/lib/Driver/Driver.cpp#L4733).

Differential Revision: https://reviews.llvm.org/D76631
clang/test/Driver/hip-device-compile.hip
clang/test/Driver/hip-toolchain-no-rdc.hip
clang/test/Driver/hip-toolchain-rdc.hip