Changeset View
Changeset View
Standalone View
Standalone View
libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | set(LIBOMPTARGET_NVPTX_ENABLE_BCLIB ${bclib_default} CACHE BOOL | ||||
"Enable CUDA LLVM bitcode offloading device RTL.") | "Enable CUDA LLVM bitcode offloading device RTL.") | ||||
if (${LIBOMPTARGET_NVPTX_ENABLE_BCLIB}) | if (${LIBOMPTARGET_NVPTX_ENABLE_BCLIB}) | ||||
if (NOT ${LIBOMPTARGET_NVPTX_BCLIB_SUPPORTED}) | if (NOT ${LIBOMPTARGET_NVPTX_BCLIB_SUPPORTED}) | ||||
libomptarget_error_say("Cannot build CUDA LLVM bitcode offloading device RTL!") | libomptarget_error_say("Cannot build CUDA LLVM bitcode offloading device RTL!") | ||||
endif() | endif() | ||||
libomptarget_say("Building CUDA LLVM bitcode offloading device RTL.") | libomptarget_say("Building CUDA LLVM bitcode offloading device RTL.") | ||||
# Set flags for LLVM Bitcode compilation. | # Set flags for LLVM Bitcode compilation. | ||||
set(bc_flags ${LIBOMPTARGET_NVPTX_SELECTED_CUDA_COMPILER_FLAGS} -DOMPTARGET_NVPTX_TEST=0) | set(bc_flags ${LIBOMPTARGET_NVPTX_SELECTED_CUDA_COMPILER_FLAGS}) | ||||
if(${LIBOMPTARGET_NVPTX_DEBUG}) | if(${LIBOMPTARGET_NVPTX_DEBUG}) | ||||
set(bc_flags ${bc_flags} -DOMPTARGET_NVPTX_DEBUG=-1) | set(bc_flags ${bc_flags} -DOMPTARGET_NVPTX_DEBUG=-1) | ||||
else() | else() | ||||
set(bc_flags ${bc_flags} -DOMPTARGET_NVPTX_DEBUG=0) | set(bc_flags ${bc_flags} -DOMPTARGET_NVPTX_DEBUG=0) | ||||
endif() | endif() | ||||
# CUDA 9 header files use the nv_weak attribute which clang is not yet prepared | # CUDA 9 header files use the nv_weak attribute which clang is not yet prepared | ||||
# to handle. Therefore, we use 'weak' instead. We are compiling only for the | # to handle. Therefore, we use 'weak' instead. We are compiling only for the | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |