1 # This file sets up a CMakeCache for a simple distribution bootstrap build.
3 #Enable LLVM projects and runtimes
4 set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
5 set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "")
7 # Only build the native target in stage1 since it is a throwaway build.
8 set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
10 # Optimize the stage1 compiler, but don't LTO it because that wastes time.
11 set(CMAKE_BUILD_TYPE Release CACHE STRING "")
13 # Setup vendor-specific settings.
14 set(PACKAGE_VENDOR LLVM.org CACHE STRING "")
16 # Setting up the stage2 LTO option needs to be done on the stage1 build so that
17 # the proper LTO library dependencies can be connected.
18 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
21 # Since LLVM_ENABLE_LTO is ON we need a LTO capable linker
22 set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
25 # Expose stage2 targets through the stage1 build configuration.
26 set(CLANG_BOOTSTRAP_TARGETS
37 clang CACHE STRING "")
39 # Setup the bootstrap build.
40 set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
43 set(CLANG_BOOTSTRAP_CMAKE_ARGS
44 -C ${STAGE2_CACHE_FILE}
47 set(CLANG_BOOTSTRAP_CMAKE_ARGS
48 -C ${CMAKE_CURRENT_LIST_DIR}/DistributionExample-stage2.cmake