[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA
Shilei Tian via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 13 10:22:59 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG53d474abc92c: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has… (authored by tianshilei1992).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98902/new/
https://reviews.llvm.org/D98902
Files:
clang/lib/Driver/ToolChains/Cuda.cpp
Index: clang/lib/Driver/ToolChains/Cuda.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Cuda.cpp
+++ clang/lib/Driver/ToolChains/Cuda.cpp
@@ -696,13 +696,12 @@
if (DriverArgs.hasArg(options::OPT_nogpulib))
return;
- std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
+ if (DeviceOffloadingKind == Action::OFK_OpenMP &&
+ DriverArgs.hasArg(options::OPT_S))
+ return;
+ std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
if (LibDeviceFile.empty()) {
- if (DeviceOffloadingKind == Action::OFK_OpenMP &&
- DriverArgs.hasArg(options::OPT_S))
- return;
-
getDriver().Diag(diag::err_drv_no_cuda_libdevice) << GpuArch;
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98902.337197.patch
Type: text/x-patch
Size: 773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210413/300e7939/attachment.bin>
More information about the cfe-commits
mailing list