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(LLVM_BUILD_TOOLS OFF CACHE BOOL "")
13 set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
14 set(LLVM_ENABLE_THREADS OFF CACHE BOOL "")
15 set(LLVM_LIBDIR_SUFFIX 64 CACHE STRING "")
16 set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
17 set(LLVM_TOOL_OPENMP_BUILD OFF CACHE BOOL "")
18 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
20 if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
21 list(APPEND EXTRA_ARGS -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=${LIBCXX_ENABLE_ABI_LINKER_SCRIPT})
24 if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
25 list(APPEND EXTRA_ARGS -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=${LIBCXX_ENABLE_STATIC_ABI_LIBRARY})
28 if (LLVM_BUILD_EXTERNAL_COMPILER_RT)
29 set(APPEND EXTRA_ARGS -DLLVM_BUILD_EXTERNAL_COMPILER_RT=${LLVM_BUILD_EXTERNAL_COMPILER_RT})
32 get_cmake_property(variableNames VARIABLES)
33 foreach(variableName ${variableNames})
34 if(variableName MATCHES "^STAGE2_")
35 string(REPLACE "STAGE2_" "" new_name ${variableName})
36 list(APPEND EXTRA_ARGS "-D${new_name}=${${variableName}}")
40 set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
41 set(CLANG_BOOTSTRAP_CMAKE_ARGS
43 -C${CMAKE_CURRENT_LIST_DIR}/Android-stage2.cmake CACHE STRING "")