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 4if($ENV{DT_TOOLCHAIN_DIR}) 5 set(CMAKE_INSTALL_PREFIX $ENV{DT_TOOLCHAIN_DIR}/usr/) 6else() 7 set(CMAKE_INSTALL_PREFIX /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.toolchain/usr/) 8endif() 9 10set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "") 11set(CLANG_VENDOR Apple CACHE STRING "") 12set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "") 13set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") 14set(LLVM_INCLUDE_UTILS OFF CACHE BOOL "") 15set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") 16set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "") 17set(COMPILER_RT_INCLUDE_TESTS OFF CACHE BOOL "") 18set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") 19set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") 20set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "") 21set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "") 22set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "") 23set(CLANG_BOOTSTRAP_PASSTHROUGH 24 CMAKE_OSX_ARCHITECTURES 25 CACHE STRING "") 26 27set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") 28set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") 29 30# LIBCXX Settings 31set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "") 32set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "") 33set(LIBCXX_OVERRIDE_DARWIN_INSTALL ON CACHE BOOL "") 34 35set(CLANG_BOOTSTRAP_TARGETS 36 generate-order-file 37 check-all 38 check-llvm 39 check-clang 40 llvm-config 41 test-suite 42 test-depends 43 llvm-test-depends 44 clang-test-depends 45 distribution 46 install-distribution 47 clang CACHE STRING "") 48 49#bootstrap 50set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") 51set(CLANG_BOOTSTRAP_CMAKE_ARGS 52 -C ${CMAKE_CURRENT_LIST_DIR}/Apple-stage2.cmake 53 CACHE STRING "") 54