[OpenMP] enable bc file compilation using the latest clang
authorGuansong Zhang <zhang.guansong@gmail.com>
Tue, 3 Apr 2018 15:01:34 +0000 (15:01 +0000)
committerGuansong Zhang <zhang.guansong@gmail.com>
Tue, 3 Apr 2018 15:01:34 +0000 (15:01 +0000)
Summary: adding cuda-rdc flag to allow extern global data

Reviewers: grokos

Reviewed By: grokos

Subscribers: gregrodgers, mgorny, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D44992

llvm-svn: 329072

openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

index 312cc3d..757b5bc 100644 (file)
@@ -145,6 +145,7 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
       # no other compiler capable of generating bitcode from cuda sources.
       set(CUDA_FLAGS
           -emit-llvm
+          -fcuda-rdc
           -O1
           -Xclang -target-feature
           -Xclang +${CUDA_PTX_VERSION}