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; }
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; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits