cmake: set -O3 option to android linker.

This commit is contained in:
Andrey Akhmichin 2024-01-15 14:10:37 +05:00
parent 2af6840ff4
commit b8e143f5ac
2 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ if(NOT MSVC)
add_compile_options(-funsafe-math-optimizations) # GCC/Clang flag
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
add_compile_options(-O3 -DNDEBUG) # gradle compiles release builds with RelWithDebInfo(-O2 -g) and strips debug symbols.
target_link_options(${CLDLL_LIBRARY} PUBLIC "LINKER:-O3")
endif()
endif()
else()

View File

@ -41,6 +41,7 @@ if(NOT MSVC)
add_compile_options(-funsafe-math-optimizations) # GCC/Clang flag
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
add_compile_options(-O3 -DNDEBUG) # gradle compiles release builds with RelWithDebInfo(-O2 -g) and strips debug symbols.
target_link_options(${SVDLL_LIBRARY} PUBLIC "LINKER:-O3")
endif()
endif()
else()