all repos — mgba @ 486a0e40170ce7e19d0fb0f4ecbab15ac5e061ca

mGBA Game Boy Advance Emulator

All: Disable LTO in non-Darwin non-gcc (it seems to be broken in Clang on other OSes)
Jeffrey Pfau jeffrey@endrift.com
Fri, 20 Feb 2015 23:43:43 -0800
commit

486a0e40170ce7e19d0fb0f4ecbab15ac5e061ca

parent

d794b2456634eed7c52b0adeed82252cae3967ac

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

jump to
M CMakeLists.txtCMakeLists.txt

@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6)

project(mGBA C) set(BINARY_NAME mgba CACHE INTERNAL "Name of output binaries") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=gnu99") -set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto") set(USE_CLI_DEBUGGER ON CACHE BOOL "Whether or not to enable the CLI-mode ARM debugger") set(USE_GDB_STUB ON CACHE BOOL "Whether or not to enable the GDB stub ARM debugger") set(USE_FFMPEG ON CACHE BOOL "Whether or not to enable FFmpeg support")

@@ -120,6 +119,11 @@ endif()

if(APPLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6") +endif() + +if(APPLE OR CMAKE_C_COMPILER_ID STREQUAL "GNU") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto") endif() if(BUILD_BBB OR BUILD_RASPI)