Compare commits

...

2 commits

Author SHA1 Message Date
sideshowbarker
915b7ede43
Merge 3d88b78d20 into 63a5717bc7 2024-11-20 23:41:43 +01:00
sideshowbarker
3d88b78d20
CMake: For Debug builds, do no compiler optimizations (-O0)
This change makes Debug builds use the CXX -O0 option — which tells the
compiler to build with no optimizations at all.

Otherwise, Debug builds use the -Og option — which, when trying to check
frame variables in lldb, can result in an error of this form:

> error: Couldn't look up symbols: __ZN2AK6Detail10StringBaseD2Ev
> Hint: The expression tried to call a function that is not present in
> the target, perhaps because it was optimized out by the compiler.
2024-11-06 15:45:01 +09:00

View file

@ -29,7 +29,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (NOT MSVC)
add_cxx_compile_options(-ggdb3)
endif()
add_cxx_compile_options(-Og)
add_cxx_compile_options(-O0)
else()
add_cxx_compile_options(-O2)
if (NOT MSVC)