[x265] [PATCH] [RFC] LTO
Peter Kovář
peter.kovar at reflexion.tv
Wed Jun 24 20:39:04 CEST 2015
# HG changeset patch
# User Peter Kovář <peter.kovar at reflexion.tv>
# Date 1435170971 -7200
# Wed Jun 24 20:36:11 2015 +0200
# Node ID 9e80570db6045a234041a072d56721b9ab9b1296
# Parent 3a5cd130f9084147168c02f26de102faf59d193b
[RFC] LTO
Link time optimization.
diff -r 3a5cd130f908 -r 9e80570db604 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Jun 22 17:39:54 2015 -0700
+++ b/source/CMakeLists.txt Wed Jun 24 20:36:11 2015 +0200
@@ -458,6 +458,13 @@
endif()
endif()
+option(ENABLE_LTO "Enable link time optimization" OFF)
+if(ENABLE_LTO)
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ list(APPEND LINKER_OPTIONS "--lto")
+ endif()
+endif()
+
if(X265_LATEST_TAG)
# convert lists of link libraries into -lstdc++ -lm etc..
foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
More information about the x265-devel
mailing list