Enabled LTO for Android 64-bit architectures
This commit is contained in:
@@ -297,6 +297,11 @@ if(ANDROID)
|
|||||||
# A bug in Android NDK r22: https://github.com/android/ndk/issues/1418
|
# A bug in Android NDK r22: https://github.com/android/ndk/issues/1418
|
||||||
if(ANDROID_ABI STREQUAL "armeabi-v7a" OR ANDROID_ABI STREQUAL "x86")
|
if(ANDROID_ABI STREQUAL "armeabi-v7a" OR ANDROID_ABI STREQUAL "x86")
|
||||||
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/settings.cpp PROPERTIES COMPILE_FLAGS "-O0")
|
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/settings.cpp PROPERTIES COMPILE_FLAGS "-O0")
|
||||||
|
else()
|
||||||
|
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
target_compile_options(openttd PRIVATE -flto=thin)
|
||||||
|
target_link_libraries(openttd -flto=thin)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif(ANDROID)
|
endif(ANDROID)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user