summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-09-26 15:36:20 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-09-26 15:36:20 +0000
commit5a3608ccfaa95dab801df9e651967168d8555719 (patch)
tree70bea5819f1f4a56f1c1e32dd7a24c50b433b605 /clang/test/Driver
parent9801d7fd9ff3dcecddbfc68b17951a4286b08703 (diff)
downloadbcm5719-llvm-5a3608ccfaa95dab801df9e651967168d8555719.tar.gz
bcm5719-llvm-5a3608ccfaa95dab801df9e651967168d8555719.zip
[OpenMP] Don't throw cudalib not found error if only front-end is required.
Summary: If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found. Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, tra Reviewed By: tra Subscribers: hfinkel, tra, cfe-commits Differential Revision: https://reviews.llvm.org/D37914 llvm-svn: 314217
Diffstat (limited to 'clang/test/Driver')
-rw-r--r--clang/test/Driver/openmp-offload-gpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c
index 81e1dfcb981..8558a36c672 100644
--- a/clang/test/Driver/openmp-offload-gpu.c
+++ b/clang/test/Driver/openmp-offload-gpu.c
@@ -135,3 +135,13 @@
// RUN: | FileCheck -check-prefix=CHK-FLAG-NOLIBDEVICE %s
// CHK-FLAG-NOLIBDEVICE-NOT: error:{{.*}}sm_60
+
+/// ###########################################################################
+
+/// Check that error is not thrown by toolchain when no cuda lib device is found when using -S.
+/// Check that the flag is passed when -fopenmp-relocatable-target is used.
+// RUN: %clang -### -S -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 \
+// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHK-NOLIBDEVICE %s
+
+// CHK-NOLIBDEVICE-NOT: error:{{.*}}sm_60
OpenPOWER on IntegriCloud