summaryrefslogtreecommitdiff
path: root/cmake/caches/PGO.cmake
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-08-16 22:16:29 +0000
committerChris Bieneman <beanz@apple.com>2016-08-16 22:16:29 +0000
commiteb1960e75654998eb9ade318fbcabaae4fa0064d (patch)
treee294a58327f37945877967bff0dd2b65f73c21f8 /cmake/caches/PGO.cmake
parent7200cc30735502829d6dcec5fbc25e8d1f6c5f00 (diff)
[CMake] Workflow improvements to PGO generation
This patch adds a few new convenience options used by the PGO CMake cache to setup options on bootstrap stages. The new options are: PGO_INSTRUMENT_LTO - Builds the instrumented and final builds with LTO PGO_BUILD_CONFIGURATION - Accepts a CMake cache script that can be used for complex configuration of the stage2-instrumented and stage2 builds. The patch also includes a fix for bootstrap dependencies so that the instrumented LTO tools don't get used when building the final stage, and it adds distribution targets to the passthrough. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/caches/PGO.cmake')
-rw-r--r--cmake/caches/PGO.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/caches/PGO.cmake b/cmake/caches/PGO.cmake
index dc11173fae..bca9ba0dea 100644
--- a/cmake/caches/PGO.cmake
+++ b/cmake/caches/PGO.cmake
@@ -7,11 +7,23 @@ set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED ON CACHE BOOL "")
set(CLANG_BOOTSTRAP_TARGETS
generate-profdata
stage2
+ stage2-distribution
+ stage2-install-distribution
stage2-check-all
stage2-check-llvm
stage2-check-clang
stage2-test-suite CACHE STRING "")
+if(PGO_INSTRUMENT_LTO)
+ set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+ set(BOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+endif()
+
+if(PGO_BUILD_CONFIGURATION)
+ set(EXTRA_ARGS -DPGO_BUILD_CONFIGURATION=${PGO_BUILD_CONFIGURATION})
+endif()
+
set(CLANG_BOOTSTRAP_CMAKE_ARGS
+ ${EXTRA_ARGS}
-C ${CMAKE_CURRENT_LIST_DIR}/PGO-stage2-instrumented.cmake
CACHE STRING "")