mirror of https://github.com/PCSX2/pcsx2.git
cmake: Og for debug build + extra debug information (ggdb3)
GSdx is utterly slow on debug build. -Og enable a couple of debugger-friendly optimization.
This commit is contained in:
parent
1e018d8a8a
commit
8987ca61a1
|
@ -254,9 +254,9 @@ if (USE_CLANG)
|
|||
if (NOT APPLE)
|
||||
set(COMMON_FLAG "${COMMON_FLAG} -no-integrated-as")
|
||||
endif()
|
||||
set(DBG "-g")
|
||||
set(DBG "-g -fno-omit-frame-pointer")
|
||||
else()
|
||||
set(DBG "-ggdb")
|
||||
set(DBG "-ggdb3 -fno-omit-frame-pointer")
|
||||
endif()
|
||||
|
||||
if (USE_LTO)
|
||||
|
@ -280,14 +280,18 @@ elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
|||
endif()
|
||||
|
||||
if (USE_ASAN)
|
||||
set(ASAN_FLAG "-fsanitize=address -fno-omit-frame-pointer ${DBG} -DASAN_WORKAROUND")
|
||||
set(ASAN_FLAG "-fsanitize=address ${DBG} -DASAN_WORKAROUND")
|
||||
else()
|
||||
set(ASAN_FLAG "")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED OPTIMIZATION_FLAG)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(OPTIMIZATION_FLAG -O0)
|
||||
if (USE_CLANG)
|
||||
set(OPTIMIZATION_FLAG -O0)
|
||||
else()
|
||||
set(OPTIMIZATION_FLAG -Og)
|
||||
endif()
|
||||
else()
|
||||
set(OPTIMIZATION_FLAG -O2)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue