This adds -DLLVM_ENABLE_LTO, rather than forcing people to manually
add -flto to the various _FLAGS variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259766
91177308-0d34-0410-b5e6-
96231b3b80d8
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS)
+option(LLVM_ENABLE_LTO "Enable link-time optimization" OFF)
+append_if(LLVM_ENABLE_LTO "-flto"
+ CMAKE_CXX_FLAGS
+ CMAKE_C_FLAGS
+ CMAKE_EXE_LINKER_FLAGS
+ CMAKE_SHARED_LINKER_FLAGS)
+
# Plugin support
# FIXME: Make this configurable.
if(WIN32 OR CYGWIN)
are ``Address``, ``Memory``, ``MemoryWithOrigins``, ``Undefined``, ``Thread``,
and ``Address;Undefined``. Defaults to empty string.
+**LLVM_ENABLE_LTO**:BOOL
+ Add the ``-flto`` flag to the compile and link command lines,
+ enabling link-time optimization. Defaults to OFF.
+
**LLVM_PARALLEL_COMPILE_JOBS**:STRING
Define the maximum number of concurrent compilation jobs.