[Openmp-commits] [openmp] 4357cfc - [OpenMP][Offloading] Add -g when compiling deviceRTLs in debug mode
Shilei Tian via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jul 18 06:34:59 PDT 2021
Author: Shilei Tian
Date: 2021-07-18T09:34:54-04:00
New Revision: 4357cfc7929ec794b4364846fd78f73c8d4f41cd
URL: https://github.com/llvm/llvm-project/commit/4357cfc7929ec794b4364846fd78f73c8d4f41cd
DIFF: https://github.com/llvm/llvm-project/commit/4357cfc7929ec794b4364846fd78f73c8d4f41cd.diff
LOG: [OpenMP][Offloading] Add -g when compiling deviceRTLs in debug mode
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
Added:
Modified:
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
index 1c5b48513c385..6371230993a0e 100644
--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -54,7 +54,7 @@ set(optimization_level 2)
# 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
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
index 243b0ff33a2c6..5120a9c0abc45 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -164,7 +164,7 @@ set(bc_flags -S -x c++ -O1 -std=c++14
-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()
More information about the Openmp-commits
mailing list