You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/05/19 08:36:43 UTC

[incubator-doris] branch master updated: [enhancement] Improve debugging experience. (#9677)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 119ff2c02d [enhancement] Improve debugging experience. (#9677)
119ff2c02d is described below

commit 119ff2c02d55b2983d782ce01a1d1c89139e1565
Author: Adonis Ling <ad...@gmail.com>
AuthorDate: Thu May 19 16:36:37 2022 +0800

    [enhancement] Improve debugging experience. (#9677)
---
 be/CMakeLists.txt | 6 +++++-
 build.sh          | 6 ++++++
 run-be-ut.sh      | 5 +++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index abad57d879..bae0965f3f 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -370,7 +370,7 @@ set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DBOOST_SYSTEM_NO_DEPRECATED")
 # Enable the cpu and heap profile of brpc
 set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DBRPC_ENABLE_CPU_PROFILER")
 
-if (USE_LLD AND NOT MAKE_TEST)
+if (USE_LLD)
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -fuse-ld=lld")
 endif ()
 
@@ -422,6 +422,10 @@ endif()
 #   -Wno-unused-local-typedefs: Do not warn for local typedefs that are unused.
 set(CXX_GCC_FLAGS "${CXX_GCC_FLAGS} -g -Wno-unused-local-typedefs")
 
+if (USE_DWARF)
+    set(CXX_GCC_FLAGS "${CXX_GCC_FLAGS} -gdwarf-5")
+endif()
+
 # For CMAKE_BUILD_TYPE=Debug
 set(CXX_FLAGS_DEBUG "${CXX_GCC_FLAGS} -O0")
 
diff --git a/build.sh b/build.sh
index eb5aece5ae..c5f91dda40 100755
--- a/build.sh
+++ b/build.sh
@@ -213,6 +213,10 @@ if [[ -z ${STRIP_DEBUG_INFO} ]]; then
     STRIP_DEBUG_INFO=OFF
 fi
 
+if [[ -z ${USE_DWARF} ]]; then
+    USE_DWARF=OFF
+fi
+
 echo "Get params:
     BUILD_FE            -- $BUILD_FE
     BUILD_BE            -- $BUILD_BE
@@ -229,6 +233,7 @@ echo "Get params:
     USE_AVX2            -- $USE_AVX2
     USE_LIBCPP          -- $USE_LIBCPP
     USE_LLD             -- $USE_LLD
+    USE_DWARF           -- $USE_DWARF
     STRIP_DEBUG_INFO    -- $STRIP_DEBUG_INFO
 "
 
@@ -290,6 +295,7 @@ if [ ${BUILD_BE} -eq 1 ] ; then
             -DUSE_LLD=${USE_LLD} \
             -DBUILD_JAVA_UDF=${BUILD_JAVA_UDF} \
             -DSTRIP_DEBUG_INFO=${STRIP_DEBUG_INFO} \
+            -DUSE_DWARF=${USE_DWARF} \
             -DUSE_AVX2=${USE_AVX2} \
             -DGLIBC_COMPATIBILITY=${GLIBC_COMPATIBILITY} ../
     ${BUILD_SYSTEM} -j ${PARALLEL}
diff --git a/run-be-ut.sh b/run-be-ut.sh
index 9727f94a2a..76854e2ebe 100755
--- a/run-be-ut.sh
+++ b/run-be-ut.sh
@@ -119,6 +119,10 @@ if [[ -z ${GLIBC_COMPATIBILITY} ]]; then
     GLIBC_COMPATIBILITY=ON
 fi
 
+if [[ -z ${USE_DWARF} ]]; then
+    USE_DWARF=OFF
+fi
+
 
 MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")"
 echo "-- Make program: ${MAKE_PROGRAM}"
@@ -132,6 +136,7 @@ ${CMAKE_CMD} -G "${GENERATOR}" \
     -DGLIBC_COMPATIBILITY="${GLIBC_COMPATIBILITY}" \
     -DBUILD_META_TOOL=OFF \
     -DWITH_MYSQL=OFF \
+    -DUSE_DWARF=${USE_DWARF} \
     ${CMAKE_USE_CCACHE} ../
 ${BUILD_SYSTEM} -j ${PARALLEL}
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org