diff options
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 211a65e..ce40df2 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -810,6 +810,12 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, if (!CudaTC) { CudaTC = std::make_unique<toolchains::CudaToolChain>( *this, *CudaTriple, *HostTC, C.getInputArgs()); + + // Emit a warning if the detected CUDA version is too new. + CudaInstallationDetector &CudaInstallation = + static_cast<toolchains::CudaToolChain &>(*CudaTC).CudaInstallation; + if (CudaInstallation.isValid()) + CudaInstallation.WarnIfUnsupportedVersion(); } C.addOffloadDeviceToolChain(CudaTC.get(), OFK); } else if (IsHIP) { |