brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 50fcc09 Raw
51 lines · plain
1# This file sets up a CMakeCache for a simple distribution bootstrap build.2 3#Enable LLVM projects and runtimes4set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")5set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "")6 7# Only build the native target in stage1 since it is a throwaway build.8set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")9 10# Optimize the stage1 compiler, but don't LTO it because that wastes time.11set(CMAKE_BUILD_TYPE Release CACHE STRING "")12 13# Setup vendor-specific settings.14set(PACKAGE_VENDOR LLVM.org CACHE STRING "")15 16# Setting up the stage2 LTO option needs to be done on the stage1 build so that17# the proper LTO library dependencies can be connected.18set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")19 20if (NOT APPLE)21  # Since LLVM_ENABLE_LTO is ON we need a LTO capable linker22  set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")23endif()24 25# Expose stage2 targets through the stage1 build configuration.26set(CLANG_BOOTSTRAP_TARGETS27  check-all28  check-llvm29  check-clang30  llvm-config31  test-suite32  test-depends33  llvm-test-depends34  clang-test-depends35  distribution36  install-distribution37  clang CACHE STRING "")38 39# Setup the bootstrap build.40set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")41 42if(STAGE2_CACHE_FILE)43  set(CLANG_BOOTSTRAP_CMAKE_ARGS44    -C ${STAGE2_CACHE_FILE}45    CACHE STRING "")46else()47  set(CLANG_BOOTSTRAP_CMAKE_ARGS48    -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake49    CACHE STRING "")50endif()51