]> granicus.if.org Git - clang/commitdiff
[CMake] Support thin LTO in PGO CMake cache
authorChris Bieneman <beanz@apple.com>
Wed, 19 Oct 2016 21:12:04 +0000 (21:12 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 19 Oct 2016 21:12:04 +0000 (21:12 +0000)
This allows you to set PGO_INSTRUMENT_LTO=Thin and have it work correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284646 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/caches/PGO.cmake

index 1f298fabeca1e049790d9b662ba8464a25bcd82a..7e4a001129cb9d0c256185728dbf2c5d383a225b 100644 (file)
@@ -16,8 +16,8 @@ set(CLANG_BOOTSTRAP_TARGETS
   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 "")
+  set(BOOTSTRAP_LLVM_ENABLE_LTO ${PGO_INSTRUMENT_LTO} CACHE BOOL "")
+  set(BOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LTO ${PGO_INSTRUMENT_LTO} CACHE BOOL "")
 endif()
 
 if(PGO_BUILD_CONFIGURATION)