From b8e143f5acd5cce9e752b4a620779f8c8aedc398 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:10:37 +0500 Subject: [PATCH] cmake: set -O3 option to android linker. --- cl_dll/CMakeLists.txt | 1 + dlls/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) 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()