1 # This file sets up a CMakeCache for an Android toolchain build.
3 set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "")
5 set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "")
6 set(CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
7 set(CLANG_TIDY_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "")
8 set(CLANG_VENDOR Android CACHE STRING "")
10 set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "")
12 set(HAVE_LIBCXXABI ON CACHE BOOL "")
13 set(LLVM_BUILD_TOOLS OFF CACHE BOOL "")
14 set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
15 set(LLVM_ENABLE_THREADS OFF CACHE BOOL "")
16 set(LLVM_LIBDIR_SUFFIX 64 CACHE STRING "")
17 set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
18 set(LLVM_TOOL_OPENMP_BUILD OFF CACHE BOOL "")
19 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
21 if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
22 list(APPEND EXTRA_ARGS -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=${LIBCXX_ENABLE_ABI_LINKER_SCRIPT})
25 if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
26 list(APPEND EXTRA_ARGS -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=${LIBCXX_ENABLE_STATIC_ABI_LIBRARY})
29 if (LLVM_BUILD_EXTERNAL_COMPILER_RT)
30 set(APPEND EXTRA_ARGS -DLLVM_BUILD_EXTERNAL_COMPILER_RT=${LLVM_BUILD_EXTERNAL_COMPILER_RT})
33 get_cmake_property(variableNames VARIABLES)
34 foreach(variableName ${variableNames})
35 if(variableName MATCHES "^STAGE2_")
36 string(REPLACE "STAGE2_" "" new_name ${variableName})
37 list(APPEND EXTRA_ARGS "-D${new_name}=${${variableName}}")
41 set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
42 set(CLANG_BOOTSTRAP_CMAKE_ARGS
44 -C${CMAKE_CURRENT_LIST_DIR}/Android-stage2.cmake CACHE STRING "")