75 lines · plain
1# This file sets up a CMakeCache for a simple build with multiple distributions.2# Note that for a real distribution, you likely want to perform a bootstrap3# build; see clang/cmake/caches/DistributionExample.cmake and the4# BuildingADistribution documentation for details. This cache file doesn't5# demonstrate bootstrapping so it can focus on the configuration details6# specific to multiple distributions instead.7 8# Build an optimized toolchain for an example set of targets.9set(CMAKE_BUILD_TYPE Release CACHE STRING "")10set(LLVM_TARGETS_TO_BUILD11 AArch6412 ARM13 X8614 CACHE STRING "")15 16# Enable the LLVM projects and runtimes.17set(LLVM_ENABLE_PROJECTS18 clang19 lld20 CACHE STRING "")21set(LLVM_ENABLE_RUNTIMES22 compiler-rt23 libcxx24 libcxxabi25 CACHE STRING "")26 27# We'll build two distributions: Toolchain, which just holds the tools28# (intended for most end users), and Development, which has libraries (for end29# users who wish to develop their own tooling using those libraries). This will30# produce the install-toolchain-distribution and install-development-distribution31# targets to install the distributions.32set(LLVM_DISTRIBUTIONS33 Toolchain34 Development35 CACHE STRING "")36 37# We want to include the C++ headers in our distribution.38set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS39 cxx-headers40 CACHE STRING "")41 42# You likely want more tools; this is just an example :) Note that we need to43# include cxx-headers explicitly here (in addition to it being added to44# LLVM_RUNTIME_DISTRIBUTION_COMPONENTS above).45set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS46 builtins47 clang48 clang-resource-headers49 cxx-headers50 lld51 llvm-objdump52 CACHE STRING "")53 54# Note that we need to include the CMake exports targets for the distribution55# (development-cmake-exports and clang-development-cmake-exports), as well as56# the general CMake exports target for each project (cmake-exports and57# clang-cmake-exports), in our list of targets. The distribution CMake exports58# targets just install the CMake exports file for the distribution's targets,59# whereas the project CMake exports targets install the rest of the project's60# CMake exports (which are needed in order to import the project from other61# CMake_projects via find_package, and include the distribution's CMake exports62# file to get the exported targets).63set(LLVM_Development_DISTRIBUTION_COMPONENTS64 # LLVM65 cmake-exports66 development-cmake-exports67 llvm-headers68 llvm-libraries69 # Clang70 clang-cmake-exports71 clang-development-cmake-exports72 clang-headers73 clang-libraries74 CACHE STRING "")75