1 # This file sets up a CMakeCache for Apple-style stage2 bootstrap. It is
2 # specified by the stage1 build.
4 set(LLVM_TARGETS_TO_BUILD X86 ARM AArch64 CACHE STRING "")
5 set(PACKAGE_VENDOR Apple CACHE STRING "")
6 set(CLANG_VENDOR_UTI com.apple.clang CACHE STRING "")
7 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
8 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
9 set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
10 set(CLANG_TOOL_SCAN_BUILD_BUILD OFF CACHE BOOL "")
11 set(CLANG_TOOL_SCAN_VIEW_BUILD OFF CACHE BOOL "")
12 set(CLANG_LINKS_TO_CREATE clang++ cc c++ CACHE STRING "")
13 set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
14 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
15 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
16 set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
17 set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
18 set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
19 set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
20 set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
22 set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
23 set(COMPILER_RT_ENABLE_IOS ON CACHE BOOL "Build iOS Compiler-RT libraries")
25 set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "Generate targets to create and install an Xcode compatible toolchain")
27 # Make unit tests (if present) part of the ALL target
28 set(LLVM_BUILD_TESTS ON CACHE BOOL "")
30 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
31 set(CMAKE_C_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
32 set(CMAKE_CXX_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
33 if(LLVM_ENABLE_LTO AND NOT LLVM_ENABLE_LTO STREQUAL "THIN")
34 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
35 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
37 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
39 set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
40 set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "")
41 set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
42 set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
43 set(LLVM_LTO_VERSION_OFFSET 3000 CACHE STRING "")
45 # Generating Xcode toolchains is useful for developers wanting to build and use
46 # clang without installing over existing tools.
47 set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "")
50 set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
51 set(LLVM_TOOLCHAIN_TOOLS
63 set(LLVM_BUILD_UTILS ON CACHE BOOL "")
64 set(LLVM_INSTALL_UTILS ON CACHE BOOL "")
65 set(LLVM_TOOLCHAIN_UTILITIES
72 set(LLVM_DISTRIBUTION_COMPONENTS
76 clang-resource-headers
78 ${LLVM_TOOLCHAIN_TOOLS}
79 ${LLVM_TOOLCHAIN_UTILITIES}
82 set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
88 set(LLVM_LIT_ARGS "--xunit-xml-output=testresults.xunit.xml -v" CACHE STRING "")