From 07aa24f6d3d1708bf51e2b925f2eb388fb3abc8b Mon Sep 17 00:00:00 2001 From: Brannon King Date: Thu, 16 Jan 2020 11:05:07 -0700 Subject: [PATCH] put symbols into test exe --- build.sh | 12 +++++++----- depends/hosts/darwin.mk | 8 ++++---- depends/hosts/linux.mk | 6 +++--- depends/hosts/mingw32.mk | 6 +++--- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/build.sh b/build.sh index c22b7e5b5..fbe26cb3b 100755 --- a/build.sh +++ b/build.sh @@ -12,7 +12,7 @@ function HELP { echo "-q: compile the QT GUI (not working at present)" echo "-d: force a rebuild of dependencies" echo "-u: run the unit tests when done" - echo "-g: include debug symbols" + echo "-g: compile in debug mode" echo "-h: show help" exit 1 } @@ -56,16 +56,18 @@ done echo "Compiling with ${PARALLEL_JOBS} jobs in parallel." -BUILD_FLAGS=(CXXFLAGS="-O3 -march=native") +BUILD_FLAGS=(CXXFLAGS="-O3 -march=native -g") +DEBUG_DEPENDS="" if test "$COMPILE_WITH_DEBUG" = true; then - BUILD_FLAGS=(--with-debug CXXFLAGS="-Og -g") + BUILD_FLAGS=(--with-debug CXXFLAGS="-O0 -g") + DEBUG_DEPENDS="DEBUG=1" fi cd depends if test "$REBUILD_DEPENDENCIES" = true; then make clean fi -make -j${PARALLEL_JOBS} ${DO_NOT_COMPILE_THE_GUI} V=1 +make -j${PARALLEL_JOBS} ${DO_NOT_COMPILE_THE_GUI} ${DEBUG_DEPENDS} V=1 cd .. LC_ALL=C autoreconf --install @@ -79,4 +81,4 @@ fi if test $? -eq 0 && "$RUN_UNIT_TESTS" = true; then ./src/test/test_lbrycrd -fi \ No newline at end of file +fi diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index e806f1d77..faed3bd0a 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -9,10 +9,10 @@ darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) -isys darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) -std=c++11 -darwin_release_CFLAGS=-O2 +darwin_release_CFLAGS=-O2 -g darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) -darwin_debug_CFLAGS=-Og -darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) +darwin_debug_CFLAGS=-Og -g +darwin_debug_CXXFLAGS=-O0 -g -darwin_native_toolchain=native_cctools \ No newline at end of file +darwin_native_toolchain=native_cctools diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk index cc7c16ad0..f1a6558e1 100644 --- a/depends/hosts/linux.mk +++ b/depends/hosts/linux.mk @@ -1,11 +1,11 @@ linux_CFLAGS=-pipe linux_CXXFLAGS=$(linux_CFLAGS) -std=c++11 -linux_release_CFLAGS=-O2 +linux_release_CFLAGS=-O2 -g linux_release_CXXFLAGS=$(linux_release_CFLAGS) -linux_debug_CFLAGS=-Og -linux_debug_CXXFLAGS=$(linux_debug_CFLAGS) +linux_debug_CFLAGS=-O1 -g +linux_debug_CXXFLAGS=-O0 -g linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk index 9a94aa382..c9a816e4d 100644 --- a/depends/hosts/mingw32.mk +++ b/depends/hosts/mingw32.mk @@ -1,10 +1,10 @@ mingw32_CFLAGS=-pipe mingw32_CXXFLAGS=$(mingw32_CFLAGS) -std=c++11 -mingw32_release_CFLAGS=-O2 +mingw32_release_CFLAGS=-O2 -g mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) -mingw32_debug_CFLAGS=-O1 -mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) +mingw32_debug_CFLAGS=-O1 -g +mingw32_debug_CXXFLAGS=-O0 -g mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC