diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index f1dce6bf..9375de27 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -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() diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 460f7a19..7da665d9 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -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()