summaryrefslogtreecommitdiffstats
path: root/llvm/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r--llvm/CMakeLists.txt14
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 678f1a74bdd..14a90d7ccc2 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -618,6 +618,9 @@ mark_as_advanced(LLVM_TARGET_TRIPLE_ENV)
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL
"Enable per-target runtimes directory")
+set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
+ "Profiling data file to use when compiling in order to improve runtime performance.")
+
# All options referred to from HandleLLVMOptions have to be specified
# BEFORE this include, otherwise options will not be correctly set on
# first cmake run
@@ -880,17 +883,6 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
# 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})
- if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
- add_definitions("-fprofile-instr-use=${LLVM_PROFDATA_FILE}")
- else()
- message(FATAL_ERROR "LLVM_PROFDATA_FILE can only be specified when compiling with clang")
- endif()
-endif()
-
include(AddLLVM)
include(TableGen)
OpenPOWER on IntegriCloud