| 1 | # This file sets up a CMakeCache for Apple-style bootstrap builds. It can be |
| 2 | # used on any Darwin system to approximate Apple Clang builds. |
| 3 | |
| 4 | if($ENV{DT_TOOLCHAIN_DIR}) |
| 5 | set(CMAKE_INSTALL_PREFIX $ENV{DT_TOOLCHAIN_DIR}/usr/) |
| 6 | else() |
| 7 | set(CMAKE_INSTALL_PREFIX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.toolchain/usr/) |
| 8 | endif() |
| 9 | |
| 10 | set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "") |
| 11 | set(CLANG_VENDOR Apple CACHE STRING "") |
| 12 | set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "") |
| 13 | set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") |
| 14 | set(LLVM_INCLUDE_UTILS OFF CACHE BOOL "") |
| 15 | set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") |
| 16 | set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "") |
| 17 | set(COMPILER_RT_INCLUDE_TESTS OFF CACHE BOOL "") |
| 18 | set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") |
| 19 | set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") |
| 20 | set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "") |
| 21 | set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") |
| 22 | set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "") |
| 23 | set(CLANG_BOOTSTRAP_PASSTHROUGH |
| 24 | CMAKE_OSX_ARCHITECTURES |
| 25 | CACHE STRING "") |
| 26 | |
| 27 | # Disabling embedded darwin compiler-rt on stage1 builds is required because we |
| 28 | # don't build stage1 to support arm code generation. |
| 29 | set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "") |
| 30 | set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "") |
| 31 | set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "") |
| 32 | |
| 33 | set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") |
| 34 | set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") |
| 35 | |
| 36 | set(CLANG_BOOTSTRAP_TARGETS |
| 37 | generate-order-file |
| 38 | check-all |
| 39 | check-llvm |
| 40 | check-clang |
| 41 | llvm-config |
| 42 | test-suite |
| 43 | test-depends |
| 44 | llvm-test-depends |
| 45 | clang-test-depends |
| 46 | distribution |
| 47 | install-distribution |
| 48 | install-xcode-toolchain |
| 49 | install-distribution-toolchain |
| 50 | clang CACHE STRING "") |
| 51 | |
| 52 | #bootstrap |
| 53 | set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") |
| 54 | set(CLANG_BOOTSTRAP_CMAKE_ARGS |
| 55 | -C ${CMAKE_CURRENT_LIST_DIR}/Apple-stage2.cmake |
| 56 | CACHE STRING "") |
| 57 | |