blob: 0932c046f628a95e4612b61d173da037905665ba [file] [log] [blame]
Petr Hosek367ad732017-02-17 19:28:54 +00001# This file sets up a CMakeCache for a Fuchsia toolchain build.
2
3set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
4
5set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
6
7set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
8set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
9set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
10set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "")
11set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
12set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
13set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
14
15set(CMAKE_BUILD_TYPE Release CACHE STRING "")
16
17set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
18if(NOT APPLE)
19 set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
20endif()
21
Petr Hosek60f54ac2017-04-13 21:09:42 +000022if(APPLE)
23 set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
24 set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
25 set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")
26endif()
27
Petr Hosek367ad732017-02-17 19:28:54 +000028set(CLANG_BOOTSTRAP_TARGETS
29 check-all
30 check-llvm
31 check-clang
32 llvm-config
33 test-suite
34 test-depends
35 llvm-test-depends
36 clang-test-depends
37 distribution
38 install-distribution
39 clang CACHE STRING "")
40
Petr Hosekdce11342017-07-19 02:57:47 +000041foreach(target x86_64;aarch64)
42 if(FUCHSIA_${target}_SYSROOT)
43 list(APPEND EXTRA_ARGS -DFUCHSIA_${target}_SYSROOT=${FUCHSIA_${target}_SYSROOT})
44 endif()
45endforeach()
Petr Hosek367ad732017-02-17 19:28:54 +000046
47# Setup the bootstrap build.
48set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
49set(CLANG_BOOTSTRAP_CMAKE_ARGS
50 ${EXTRA_ARGS}
51 -C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
52 CACHE STRING "")