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(LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES OFF CACHE BOOL "")
19 set(LLVM_PLUGIN_SUPPORT OFF CACHE BOOL "")
20 set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
21 set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
22 set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
24 set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
25 set(COMPILER_RT_ENABLE_IOS ON CACHE BOOL "Build iOS Compiler-RT libraries")
27 set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "Generate targets to create and install an Xcode compatible toolchain")
29 # Make unit tests (if present) part of the ALL target
30 set(LLVM_BUILD_TESTS ON CACHE BOOL "")
32 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
33 set(CMAKE_C_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
34 set(CMAKE_CXX_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
35 if(LLVM_ENABLE_LTO AND NOT LLVM_ENABLE_LTO STREQUAL "THIN")
36 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
37 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
39 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
41 set(LLVM_LTO_VERSION_OFFSET 3000 CACHE STRING "")
43 # Generating Xcode toolchains is useful for developers wanting to build and use
44 # clang without installing over existing tools.
45 set(LLVM_CREATE_XCODE_TOOLCHAIN ON CACHE BOOL "")
48 set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
49 set(LLVM_TOOLCHAIN_TOOLS
61 set(LLVM_BUILD_UTILS ON CACHE BOOL "")
62 set(LLVM_INSTALL_UTILS ON CACHE BOOL "")
63 set(LLVM_TOOLCHAIN_UTILITIES
70 set(LLVM_DISTRIBUTION_COMPONENTS
74 clang-resource-headers
76 ${LLVM_TOOLCHAIN_TOOLS}
77 ${LLVM_TOOLCHAIN_UTILITIES}
80 # Build the libc++ headers
81 set(LLVM_ENABLE_RUNTIMES "libcxx;libcxxabi" CACHE STRING "")
82 set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS cxx-headers CACHE STRING "")
83 set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
84 set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "")
85 set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
86 set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
90 set(LLVM_LIT_ARGS "--xunit-xml-output=testresults.xunit.xml -v" CACHE STRING "")