2017-02-18 03:28:54 +08:00
|
|
|
# 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(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
|
2018-06-28 13:15:46 +08:00
|
|
|
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
|
2017-11-28 04:29:13 +08:00
|
|
|
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
|
|
|
|
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
|
2018-06-28 13:15:46 +08:00
|
|
|
set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "")
|
2017-02-18 03:28:54 +08:00
|
|
|
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
|
|
|
|
|
2017-12-22 06:10:27 +08:00
|
|
|
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
|
2017-02-18 03:28:54 +08:00
|
|
|
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()
|
|
|
|
|
2018-06-12 06:06:44 +08:00
|
|
|
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
|
|
|
|
set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")
|
|
|
|
|
2017-04-14 05:09:42 +08:00
|
|
|
if(APPLE)
|
|
|
|
set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
|
|
|
|
set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
|
|
|
|
set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")
|
2018-06-29 04:33:18 +08:00
|
|
|
elseif(UNIX)
|
2018-06-29 04:19:11 +08:00
|
|
|
set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
|
|
|
|
set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
|
|
|
|
set(LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
|
|
|
|
set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
|
|
|
|
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
|
|
|
|
set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
|
|
|
|
set(LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
|
|
|
|
set(LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "")
|
|
|
|
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
|
|
|
|
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
|
|
|
|
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
|
2017-04-14 05:09:42 +08:00
|
|
|
endif()
|
|
|
|
|
2017-02-18 03:28:54 +08:00
|
|
|
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
|
2018-06-06 13:18:39 +08:00
|
|
|
install-distribution-stripped
|
2017-02-18 03:28:54 +08:00
|
|
|
clang CACHE STRING "")
|
|
|
|
|
2018-05-08 10:47:13 +08:00
|
|
|
get_cmake_property(variableNames VARIABLES)
|
|
|
|
foreach(variableName ${variableNames})
|
|
|
|
if(variableName MATCHES "^STAGE2_")
|
|
|
|
string(REPLACE "STAGE2_" "" new_name ${variableName})
|
|
|
|
list(APPEND EXTRA_ARGS "-D${new_name}=${${variableName}}")
|
2017-07-19 10:57:47 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2017-02-18 03:28:54 +08:00
|
|
|
|
|
|
|
# Setup the bootstrap build.
|
|
|
|
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
|
2018-06-12 06:06:44 +08:00
|
|
|
set(CLANG_BOOTSTRAP_EXTRA_DEPS
|
|
|
|
builtins
|
|
|
|
runtimes
|
|
|
|
CACHE STRING "")
|
2017-02-18 03:28:54 +08:00
|
|
|
set(CLANG_BOOTSTRAP_CMAKE_ARGS
|
|
|
|
${EXTRA_ARGS}
|
|
|
|
-C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake
|
|
|
|
CACHE STRING "")
|