Currently when we compile the project in debug mode, `-g` will not be added to
compilation flag. The bc files generated in different mode are of different size.
When using GPU debuggers like `cuda-gdb`, it is expected to provide more info
with a debug version of bc lib.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D106229
# Activate RTL message dumps if requested by the user.
if(LIBOMPTARGET_NVPTX_DEBUG)
- set(CUDA_DEBUG -DOMPTARGET_NVPTX_DEBUG=-1)
+ set(CUDA_DEBUG -DOMPTARGET_NVPTX_DEBUG=-1 -g)
endif()
get_filename_component(devicertl_base_directory
-I${devicertl_nvptx_directory}/src)
if(${LIBOMPTARGET_NVPTX_DEBUG})
- list(APPEND bc_flags -DOMPTARGET_NVPTX_DEBUG=-1)
+ list(APPEND bc_flags -DOMPTARGET_NVPTX_DEBUG=-1 -g)
else()
list(APPEND bc_flags -DOMPTARGET_NVPTX_DEBUG=0)
endif()