Commit Graph

2 Commits

Author SHA1 Message Date
Alexandre Ganea 5896e2df45 [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
2020-03-23 16:54:48 -04:00
Yaxun Liu f13b8d4fe9 [HIP] Support -emit-llvm for device compilation
Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
there are lots of options needed.

This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.

Differential Revision: https://reviews.llvm.org/D68284

llvm-svn: 373561
2019-10-03 03:27:43 +00:00