mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[CMake] Add LLVM_BUILD_INSTRUMENTED option to enable building with -fprofile-instr-generate
This is the first step in supporting PGO data generation via CMake. I've marked the option as advanced and experimental until it is fleshed out further. llvm-svn: 255298
This commit is contained in:
parent
ea27e92765
commit
28da4411df
@ -587,6 +587,14 @@ if(LLVM_ENABLE_EH AND NOT LLVM_ENABLE_RTTI)
|
||||
message(FATAL_ERROR "Exception handling requires RTTI. You must set LLVM_ENABLE_RTTI to ON")
|
||||
endif()
|
||||
|
||||
option(LLVM_BUILD_INSTRUMENTED "Build LLVM and tools with PGO instrumentation (experimental)" Off)
|
||||
mark_as_advanced(LLVM_BUILD_INSTRUMENTED)
|
||||
append_if(LLVM_BUILD_INSTRUMENTED "-fprofile-instr-generate"
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS)
|
||||
|
||||
# Plugin support
|
||||
# FIXME: Make this configurable.
|
||||
if(WIN32 OR CYGWIN)
|
||||
|
Loading…
Reference in New Issue
Block a user