[clang] 97fe5fa - [Driver] Pass `--cuda-path` to test (#117415)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 25 16:05:33 PST 2024
Author: Kai Luo
Date: 2024-11-26T08:05:29+08:00
New Revision: 97fe5fa54c2e99dc0fe14fff1940b31bf697eff2
URL: https://github.com/llvm/llvm-project/commit/97fe5fa54c2e99dc0fe14fff1940b31bf697eff2
DIFF: https://github.com/llvm/llvm-project/commit/97fe5fa54c2e99dc0fe14fff1940b31bf697eff2.diff
LOG: [Driver] Pass `--cuda-path` to test (#117415)
My local build, on Debian GNU/Linux 12 (bookworm), complains
```
clang: error: GPU arch sm_20 is supported by CUDA versions between 7.0 and 8.0 (inclusive), but installation at /usr/lib/cuda is 11.8; use '--cuda-path' to specify a different CUDA install, pass a different GPU arch with '--cuda-gpu-arch', or pass '--no-cuda-version-check'
```
Fix it by passing `--cuda-path`. Hope this doesn't affect the original
intention of the test.
Added:
Modified:
clang/test/Driver/cuda-no-threadsafe-statics.cu
Removed:
################################################################################
diff --git a/clang/test/Driver/cuda-no-threadsafe-statics.cu b/clang/test/Driver/cuda-no-threadsafe-statics.cu
index eb15312f8f7d14..8730605f18828e 100644
--- a/clang/test/Driver/cuda-no-threadsafe-statics.cu
+++ b/clang/test/Driver/cuda-no-threadsafe-statics.cu
@@ -2,7 +2,8 @@
// compilation only.
//
// RUN: %clang -### -x cuda --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 %s \
-// RUN: -nocudainc -nocudalib 2>&1 | FileCheck %s
+// RUN: -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: 2>&1 | FileCheck %s
// RUN: %clang -### -x hip --target=x86_64-linux-gnu -c --cuda-gpu-arch=gfx1010 %s \
// RUN: -nocudainc -nocudalib 2>&1 | FileCheck %s
More information about the cfe-commits
mailing list