From b7bf3f046428819f6e15148afca60d979b29185a Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Tue, 13 Feb 2024 20:19:14 -0500 Subject: [PATCH] Adjust debug info argument for HIP compiler It is reported in #3742 that ROCm 5.3.0-5.7.1 fail at the link stage since `-gline-tables-only -fdebug-info-for-profiling` solves the issue. Note that for Intel SYCL compilers, we use these two arguments too. No changes are made to CMake because in Realease build type, no debug info is added. --- Tools/GNUMake/comps/hip.mak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/GNUMake/comps/hip.mak b/Tools/GNUMake/comps/hip.mak index f887b206e4c..cf609f367fb 100644 --- a/Tools/GNUMake/comps/hip.mak +++ b/Tools/GNUMake/comps/hip.mak @@ -91,10 +91,10 @@ ifeq ($(HIP_COMPILER),clang) else # DEBUG=FALSE flags - CXXFLAGS += -g -O3 -munsafe-fp-atomics - CFLAGS += -g -O3 - FFLAGS += -g -O3 - F90FLAGS += -g -O3 + CXXFLAGS += -gline-tables-only -fdebug-info-for-profiling -O3 -munsafe-fp-atomics + CFLAGS += -gline-tables-only -fdebug-info-for-profiling -O3 + FFLAGS += -g1 -O3 + F90FLAGS += -g1 -O3 endif