From cbf061d18f802b0c1d94ab4e5f54cbea0eee0d5e Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 7 Dec 2022 14:32:07 +0100 Subject: [PATCH] Make build-debug.sh also add debug symbols to luna --- luna/CMakeLists.txt | 7 +++++++ tools/build-debug.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/luna/CMakeLists.txt b/luna/CMakeLists.txt index b8e43f9e..a8af5718 100644 --- a/luna/CMakeLists.txt +++ b/luna/CMakeLists.txt @@ -7,6 +7,7 @@ set(FREESTANDING_SOURCES src/Units.cpp src/SystemError.cpp src/Bitmap.cpp + src/Stack.cpp ) set(SOURCES @@ -41,4 +42,10 @@ target_compile_options(luna-freestanding PRIVATE -mno-red-zone) target_compile_options(luna-freestanding PRIVATE -mno-80387 -mno-mmx -mno-sse -mno-sse2) target_compile_definitions(luna-freestanding PUBLIC ARCH_X86_64) target_compile_definitions(luna PUBLIC ARCH_X86_64) +endif() + +if(LUNA_DEBUG_SYMBOLS) + message(STATUS "Building Luna with debug symbols") + target_compile_options(luna PRIVATE -ggdb) + target_compile_options(luna-freestanding PRIVATE -ggdb) endif() \ No newline at end of file diff --git a/tools/build-debug.sh b/tools/build-debug.sh index 85d83455..0fcb695e 100755 --- a/tools/build-debug.sh +++ b/tools/build-debug.sh @@ -9,7 +9,7 @@ tools/setup.sh tools/full-clean.sh -cmake -S . -B $BUILD_DIR -DMOON_DEBUG_SYMBOLS=ON -G "$CMAKE_GEN" +cmake -S . -B $BUILD_DIR -DMOON_DEBUG_SYMBOLS=ON -DLUNA_DEBUG_SYMBOLS=ON -G "$CMAKE_GEN" cmake --build $BUILD_DIR cmake --install $BUILD_DIR