[NFC] Colocate cache values for controling libc++ headers build in stage 2
authorLouis Dionne <ldionne.2@gmail.com>
Wed, 24 Aug 2022 12:50:46 +0000 (08:50 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 24 Aug 2022 12:50:52 +0000 (08:50 -0400)
clang/cmake/caches/Apple-stage2.cmake

index 63f92ea..3ed7251 100644 (file)
@@ -36,10 +36,6 @@ if(LLVM_ENABLE_LTO AND NOT LLVM_ENABLE_LTO STREQUAL "THIN")
 endif()
 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
 
-set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
-set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "")
-set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
-set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
 set(LLVM_LTO_VERSION_OFFSET 3000 CACHE STRING "")
 
 # Generating Xcode toolchains is useful for developers wanting to build and use
@@ -79,9 +75,13 @@ set(LLVM_DISTRIBUTION_COMPONENTS
   ${LLVM_TOOLCHAIN_UTILITIES}
   CACHE STRING "")
 
-set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
-  cxx-headers
-  CACHE STRING "")
+# Build the libc++ headers
+# Note that LLVM_ENABLE_RUNTIMES must be passed on the command-line.
+set(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS cxx-headers CACHE STRING "")
+set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
+set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "")
+set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
+set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
 
 # test args