all repos — mgba @ c9dbbee24634a5b9cee44f3aab9113274d7784b8

mGBA Game Boy Advance Emulator

3DS: Turn off LTO by default
Vicki Pfau vi@endrift.com
Mon, 30 Jan 2017 10:06:04 -0800
commit

c9dbbee24634a5b9cee44f3aab9113274d7784b8

parent

f5a7c53b6e1e29113e742a71b93e4faf8c6b6d71

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -160,7 +160,14 @@ list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)

source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c) # Advanced settings -set(BUILD_LTO ON CACHE BOOL "Build with link-time optimization") +if(NOT 3DS) + # LTO appears to make 3DS binary slower + set(DEFAULT_LTO ON) +else() + set(DEFAULT_LTO OFF) +endif() + +set(BUILD_LTO ${DEFAULT_LTO} CACHE BOOL "Build with link-time optimization") set(BUILD_PGO OFF CACHE BOOL "Build with profiling-guided optimization") set(PGO_STAGE_2 CACHE BOOL "Rebuild for profiling-guided optimization after profiles have been generated") set(PGO_DIR "/tmp/gba-pgo/" CACHE PATH "Profiling-guided optimization profiles path")