1set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "") 2set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "") 3 4set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "") 5set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "") 6 7if(APPLE) 8 # Use LLD to have fewer requirements on system linker, unless we're on an apple 9 # platform where the system compiler is to be preferred. 10 set(BOOTSTRAP_LLVM_ENABLE_LLD OFF CACHE BOOL "") 11 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") 12elseif(CMAKE_HOST_UNIX) 13 # s390/SystemZ is unsupported by LLD, so don't try to enable LTO if it 14 # cannot work. 15 # We do our own uname business here since the appropriate variables from CMake 16 # and llvm are not yet available. 17 find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) 18 if(CMAKE_UNAME) 19 exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR 20 RETURN_VALUE val) 21 endif(CMAKE_UNAME) 22 23 if("${CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "s390") 24 set(BOOTSTRAP_LLVM_ENABLE_LTO OFF CACHE BOOL "") 25 set(BOOTSTRAP_LLVM_ENABLE_LLD OFF CACHE BOOL "") 26 else() 27 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") 28 set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") 29 endif() 30 31else() 32 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") 33 set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") 34endif() 35 36 37set(CLANG_BOOTSTRAP_TARGETS 38 clang 39 check-all 40 check-llvm 41 check-clang 42 test-suite CACHE STRING "") 43 44set(CLANG_BOOTSTRAP_CMAKE_ARGS 45 -C ${CMAKE_CURRENT_LIST_DIR}/3-stage-base.cmake 46 CACHE STRING "") 47