[clang] cb3136b - [clang] Pass --cuda-path to fix test/Driver/openmp-offload-jit.c

Jonas Hahnfeld via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 01:22:51 PDT 2023


Author: Jonas Hahnfeld
Date: 2023-08-08T10:21:55+02:00
New Revision: cb3136b0d3596f5c3984e4fb49359e2a1a28a547

URL: https://github.com/llvm/llvm-project/commit/cb3136b0d3596f5c3984e4fb49359e2a1a28a547
DIFF: https://github.com/llvm/llvm-project/commit/cb3136b0d3596f5c3984e4fb49359e2a1a28a547.diff

LOG: [clang] Pass --cuda-path to fix test/Driver/openmp-offload-jit.c

This test was trying to detect a system installation of CUDA and was
marked as returning exit code 1 as part of D156363. Pass an explicit
CUDA installation to make the test return exit code 0 regardless of
a CUDA being found on the system or not. Also add an explicit -march
to get a stable test.

Added: 
    

Modified: 
    clang/test/Driver/openmp-offload-jit.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/openmp-offload-jit.c b/clang/test/Driver/openmp-offload-jit.c
index d293c72b2ba1d0..6f5ae7ed7365d1 100644
--- a/clang/test/Driver/openmp-offload-jit.c
+++ b/clang/test/Driver/openmp-offload-jit.c
@@ -36,9 +36,10 @@
 // PHASES-JIT-NEXT: 13: clang-linker-wrapper, {12}, image, (host-openmp)
 
 // Check that we add the `--embed-bitcode` flag to the linker wrapper.
-// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \
-// RUN:   -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \
-// RUN: | FileCheck -check-prefix=LINKER %s
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \
+// RUN:   --cuda-path=%S/Inputs/CUDA_111/usr/local/cuda \
+// RUN:   -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_52 \
+// RUN:   -fopenmp-target-jit %s 2>&1 | FileCheck -check-prefix=LINKER %s
 // LINKER: clang-linker-wrapper"{{.*}}"--embed-bitcode"
 
 // Check for incompatible combinations


        


More information about the cfe-commits mailing list