Try add LTO

This commit is contained in:
zhupengfei committed 2020-05-16 19:50:08 +08:00
1 parent ebab1c433b
commit 47df56ea36
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -128,6 +128,10 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
set(PLATFORM_LIBRARIES rt)
endif()
if (NOT MSVC)
add_compile_options("-flto")
endif()
# Include source code
# ===================
add_subdirectory(externals)
+1 -1
View File
@@ -104,7 +104,7 @@ else()
if (MINGW_STATIC_BUILD)
add_definitions(-DQT_STATICPLUGIN)
add_compile_options("-static -flto")
add_compile_options("-static")
endif()
endif()