blob: c8a8cf6d58b7e577aaa1d860fa9dbb1a7a449f6f [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
41if(FUCHSIA_SYSROOT)
42 set(EXTRA_ARGS -DFUCHSIA_SYSROOT=${FUCHSIA_SYSROOT})
43endif()
44
45# Setup the bootstrap build.
46set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
47set(CLANG_BOOTSTRAP_CMAKE_ARGS
48 ${EXTRA_ARGS}
49 -C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
50 CACHE STRING "")