Amir created this revision. Amir added a reviewer: phosek. Herald added a subscriber: wenlei. Herald added a project: All. Amir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Provide a way to install usable BOLT-optimized Clang (clang + resource headers) using `ninja clang-bolt install-distribution` with BOLT.cmake cache file or `ninja stage2-clang-bolt stage2-install-distribution` with BOLT-PGO.cmake cache file. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D140565 Files: clang/cmake/caches/BOLT-PGO.cmake clang/cmake/caches/BOLT.cmake Index: clang/cmake/caches/BOLT.cmake =================================================================== --- clang/cmake/caches/BOLT.cmake +++ clang/cmake/caches/BOLT.cmake @@ -15,3 +15,10 @@ set(LLVM_ENABLE_PROJECTS "bolt;clang" CACHE STRING "") set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") + +# setup toolchain +set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") +set(LLVM_DISTRIBUTION_COMPONENTS + clang + clang-resource-headers + CACHE STRING "") Index: clang/cmake/caches/BOLT-PGO.cmake =================================================================== --- clang/cmake/caches/BOLT-PGO.cmake +++ clang/cmake/caches/BOLT-PGO.cmake @@ -2,10 +2,16 @@ set(CLANG_BOOTSTRAP_TARGETS stage2-clang-bolt + stage2-distribution + stage2-install-distribution CACHE STRING "") set(BOOTSTRAP_CLANG_BOOTSTRAP_TARGETS clang-bolt + distribution + install-distribution CACHE STRING "") -set(PGO_BUILD_CONFIGURATION ${CMAKE_CURRENT_LIST_DIR}/BOLT.cmake CACHE STRING "") +set(PGO_BUILD_CONFIGURATION + ${CMAKE_CURRENT_LIST_DIR}/BOLT.cmake + CACHE STRING "") include(${CMAKE_CURRENT_LIST_DIR}/PGO.cmake)
Index: clang/cmake/caches/BOLT.cmake =================================================================== --- clang/cmake/caches/BOLT.cmake +++ clang/cmake/caches/BOLT.cmake @@ -15,3 +15,10 @@ set(LLVM_ENABLE_PROJECTS "bolt;clang" CACHE STRING "") set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") + +# setup toolchain +set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") +set(LLVM_DISTRIBUTION_COMPONENTS + clang + clang-resource-headers + CACHE STRING "") Index: clang/cmake/caches/BOLT-PGO.cmake =================================================================== --- clang/cmake/caches/BOLT-PGO.cmake +++ clang/cmake/caches/BOLT-PGO.cmake @@ -2,10 +2,16 @@ set(CLANG_BOOTSTRAP_TARGETS stage2-clang-bolt + stage2-distribution + stage2-install-distribution CACHE STRING "") set(BOOTSTRAP_CLANG_BOOTSTRAP_TARGETS clang-bolt + distribution + install-distribution CACHE STRING "") -set(PGO_BUILD_CONFIGURATION ${CMAKE_CURRENT_LIST_DIR}/BOLT.cmake CACHE STRING "") +set(PGO_BUILD_CONFIGURATION + ${CMAKE_CURRENT_LIST_DIR}/BOLT.cmake + CACHE STRING "") include(${CMAKE_CURRENT_LIST_DIR}/PGO.cmake)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits