Skip to content

Commit cf1279b

Browse files
author
aidan.belton
committed
Update from feedback
1 parent 02a8426 commit cf1279b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

clang/lib/Driver/ToolChains/Cuda.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ CudaInstallationDetector::CudaInstallationDetector(
202202
LibPath = InstallPath + "/lib/x64";
203203
else if (FS.exists(InstallPath + "/lib/Win32"))
204204
LibPath = InstallPath + "/lib/Win32";
205+
else if (FS.exists(InstallPath + "/lib"))
206+
LibPath = InstallPath + "/lib";
205207
else
206208
continue;
207209
} else {
@@ -746,7 +748,7 @@ void CudaToolChain::addClangTargetOptions(
746748
for (StringRef LibraryPath : LibraryPaths) {
747749
SmallString<128> LibSpirvTargetFile(LibraryPath);
748750
llvm::sys::path::append(LibSpirvTargetFile, LibSpirvTargetName);
749-
if (llvm::sys::fs::exists(LibSpirvTargetFile)) {
751+
if (llvm::sys::fs::exists(LibSpirvTargetFile) || DriverArgs.hasArg(options::OPT__HASH_HASH_HASH)) {
750752
LibSpirvFile = std::string(LibSpirvTargetFile.str());
751753
break;
752754
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda-sycldevice -nocudalib -target x86_64-unknown-windows-msvc %s 2> %t.win.out
2+
// RUN: FileCheck %s --check-prefixes=CHECK-WINDOWS --input-file %t.win.out
3+
// CHECK-WINDOWS: remangled-l32-signed_char.libspirv-nvptx64--nvidiacl.bc
4+
//
5+
// RUN: %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda-sycldevice -nocudalib -target x86_64-unknown-linux-gnu %s 2> %t.lnx.out
6+
// RUN: FileCheck %s --check-prefixes=CHECK-LINUX --input-file %t.lnx.out
7+
// CHECK-LINUX: remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc

0 commit comments

Comments
 (0)