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)
|
if (NOT APPLE)
|
||||||
set(COMMON_FLAG "${COMMON_FLAG} -no-integrated-as")
|
set(COMMON_FLAG "${COMMON_FLAG} -no-integrated-as")
|
||||||
endif()
|
endif()
|
||||||
set(DBG "-g")
|
set(DBG "-g -fno-omit-frame-pointer")
|
||||||
else()
|
else()
|
||||||
set(DBG "-ggdb")
|
set(DBG "-ggdb3 -fno-omit-frame-pointer")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_LTO)
|
if (USE_LTO)
|
||||||
|
@ -280,14 +280,18 @@ elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_ASAN)
|
if (USE_ASAN)
|
||||||
set(ASAN_FLAG "-fsanitize=address -fno-omit-frame-pointer ${DBG} -DASAN_WORKAROUND")
|
set(ASAN_FLAG "-fsanitize=address ${DBG} -DASAN_WORKAROUND")
|
||||||
else()
|
else()
|
||||||
set(ASAN_FLAG "")
|
set(ASAN_FLAG "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED OPTIMIZATION_FLAG)
|
if(NOT DEFINED OPTIMIZATION_FLAG)
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
set(OPTIMIZATION_FLAG -O0)
|
if (USE_CLANG)
|
||||||
|
set(OPTIMIZATION_FLAG -O0)
|
||||||
|
else()
|
||||||
|
set(OPTIMIZATION_FLAG -Og)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(OPTIMIZATION_FLAG -O2)
|
set(OPTIMIZATION_FLAG -O2)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue