[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.
This commit is contained in:
Jonas Hahnfeld 2023-08-08 09:46:36 +02:00
parent 38cf47f037
commit cb3136b0d3

View File

@ -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