[llvm] r250108 - [CMake] Adding support for passing in profiling data.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 14:13:20 PDT 2015
Author: cbieneman
Date: Mon Oct 12 16:13:20 2015
New Revision: 250108
URL: http://llvm.org/viewvc/llvm-project?rev=250108&view=rev
Log:
[CMake] Adding support for passing in profiling data.
Adds LLVM_PROFDATA_FILE option to allow specifying a profile data file to be used during compilation of LLVM and subprojects.
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=250108&r1=250107&r2=250108&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Oct 12 16:13:20 2015
@@ -590,6 +590,13 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunO
# use export_executable_symbols(target).
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
+set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
+ "Profiling data file to use when compiling in order to improve runtime performance.")
+
+if(LLVM_PROFDATA_FILE AND EXISTS ${LLVM_PROFDATA_FILE})
+ add_definitions("-fprofile-instr-use=${LLVM_PROFDATA_FILE}")
+endif()
+
include(AddLLVM)
include(TableGen)
More information about the llvm-commits
mailing list