summaryrefslogtreecommitdiff
path: root/cmake/caches/Fuchsia.cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-02-17 19:28:54 +0000
committerPetr Hosek <phosek@chromium.org>2017-02-17 19:28:54 +0000
commitd4fdc4cc215a091ed8bdd54a7e9a9c75abf263f4 (patch)
tree056ba7551a13bfbbe1ea222ae82d7b4886ed0b3c /cmake/caches/Fuchsia.cmake
parentf5e70210f247a8f746d0664f88e89140f959f15b (diff)
[CMake] Add Fuchsia toolchain CMake cache files
These cache files can be used to build Fuchsia toolchain. They also demonstrate the use of multi-target builtins build. Differential Revision: https://reviews.llvm.org/D26654 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/caches/Fuchsia.cmake')
-rw-r--r--cmake/caches/Fuchsia.cmake44
1 files changed, 44 insertions, 0 deletions
diff --git a/cmake/caches/Fuchsia.cmake b/cmake/caches/Fuchsia.cmake
new file mode 100644
index 0000000000..a90647e4ae
--- /dev/null
+++ b/cmake/caches/Fuchsia.cmake
@@ -0,0 +1,44 @@
+# This file sets up a CMakeCache for a Fuchsia toolchain build.
+
+set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
+
+set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
+
+set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
+set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "")
+set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
+set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
+set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
+
+set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+
+set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+if(NOT APPLE)
+ set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
+endif()
+
+set(CLANG_BOOTSTRAP_TARGETS
+ check-all
+ check-llvm
+ check-clang
+ llvm-config
+ test-suite
+ test-depends
+ llvm-test-depends
+ clang-test-depends
+ distribution
+ install-distribution
+ clang CACHE STRING "")
+
+if(FUCHSIA_SYSROOT)
+ set(EXTRA_ARGS -DFUCHSIA_SYSROOT=${FUCHSIA_SYSROOT})
+endif()
+
+# Setup the bootstrap build.
+set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
+set(CLANG_BOOTSTRAP_CMAKE_ARGS
+ ${EXTRA_ARGS}
+ -C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
+ CACHE STRING "")