Use ThinLTO for shared library building.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-09-12 17:04:43 +02:00
parent def38e98c6
commit aaaad658b0
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ find_package(Threads REQUIRED)
set(LIBTYPE STATIC) set(LIBTYPE STATIC)
if (SHARED) if (SHARED)
set(LIBTYPE SHARED) set(LIBTYPE SHARED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-flto=thin)
add_link_options(-flto=thin)
endif ()
endif (SHARED) endif (SHARED)
if (LEVEL_SIZE STREQUAL "8") if (LEVEL_SIZE STREQUAL "8")