mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
cmake: Add a flag to enable LTO
This adds -DLLVM_ENABLE_LTO, rather than forcing people to manually add -flto to the various _FLAGS variables. llvm-svn: 259766
This commit is contained in:
parent
a26758c5e3
commit
d393294b5b
@ -656,6 +656,13 @@ append_if(LLVM_BUILD_INSTRUMENTED "-fprofile-instr-generate"
|
|||||||
CMAKE_EXE_LINKER_FLAGS
|
CMAKE_EXE_LINKER_FLAGS
|
||||||
CMAKE_SHARED_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
|
# Plugin support
|
||||||
# FIXME: Make this configurable.
|
# FIXME: Make this configurable.
|
||||||
if(WIN32 OR CYGWIN)
|
if(WIN32 OR CYGWIN)
|
||||||
|
@ -347,6 +347,10 @@ LLVM-specific variables
|
|||||||
are ``Address``, ``Memory``, ``MemoryWithOrigins``, ``Undefined``, ``Thread``,
|
are ``Address``, ``Memory``, ``MemoryWithOrigins``, ``Undefined``, ``Thread``,
|
||||||
and ``Address;Undefined``. Defaults to empty string.
|
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
|
**LLVM_PARALLEL_COMPILE_JOBS**:STRING
|
||||||
Define the maximum number of concurrent compilation jobs.
|
Define the maximum number of concurrent compilation jobs.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user