[Openmp-commits] [PATCH] D45530: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag

Guansong Zhang via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 20 13:44:18 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330477: [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag (authored by guansong, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D45530?vs=142069&id=143379#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D45530

Files:
  openmp/trunk/libomptarget/deviceRTLs/nvptx/CMakeLists.txt


Index: openmp/trunk/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
===================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -141,15 +141,21 @@
         set(CUDA_PTX_VERSION ptx42)
       endif()
  
+      set(BC_DEBUG -DOMPTARGET_NVPTX_DEBUG=0)
+      if(${LIBOMPTARGET_NVPTX_DEBUG})
+        set(BC_DEBUG -DOMPTARGET_NVPTX_DEBUG=-1)
+      endif()
+
       # Set flags for Clang cuda compilation.  Only Clang is supported because there is
       # no other compiler capable of generating bitcode from cuda sources.
       set(CUDA_FLAGS
           -emit-llvm
           -O1
           -Xclang -target-feature
           -Xclang +${CUDA_PTX_VERSION}
           --cuda-device-only
-          -DOMPTARGET_NVPTX_TEST=0 -DOMPTARGET_NVPTX_DEBUG=0
+          -DOMPTARGET_NVPTX_TEST=0
+          ${BC_DEBUG}
       )
 
       # CUDA 9 header files use the nv_weak attribute which clang is not yet prepared


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45530.143379.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180420/cc7d13df/attachment.bin>


More information about the Openmp-commits mailing list