[libcxx-commits] [PATCH] D81293: [libc++][CMake] Add CMake caches for commonly supported configurations

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 5 12:22:59 PDT 2020


ldionne created this revision.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous, mgorny.
Herald added a project: libc++.
Herald added a reviewer: libc++.
ldionne added a reviewer: EricWF.
ldionne added a child revision: D81294: [libc++] Use the supported caches to setup build bots.
ldionne added a comment.

The benefit of this approach is that it's easier to reproduce a build bot failure by just using the corresponding cache. Of course, that doesn't account for differences like compiler version or operating system, but it's a step in the right direction.


This commit adds CMake caches for the various configurations of libc++
that are tested by our build bots.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81293

Files:
  libcxx/cmake/caches/Generic-32bits.cmake
  libcxx/cmake/caches/Generic-asan.cmake
  libcxx/cmake/caches/Generic-cxx03.cmake
  libcxx/cmake/caches/Generic-cxx11.cmake
  libcxx/cmake/caches/Generic-cxx14.cmake
  libcxx/cmake/caches/Generic-cxx17.cmake
  libcxx/cmake/caches/Generic-cxx2a.cmake
  libcxx/cmake/caches/Generic-msan.cmake
  libcxx/cmake/caches/Generic-noexceptions.cmake
  libcxx/cmake/caches/Generic-singlethreaded.cmake
  libcxx/cmake/caches/Generic-tsan.cmake
  libcxx/cmake/caches/Generic-ubsan.cmake
  libcxx/cmake/caches/README.md


Index: libcxx/cmake/caches/README.md
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/README.md
@@ -0,0 +1,13 @@
+# libc++ / libc++abi configuration caches
+
+This directory contains CMake caches for the supported configurations of libc++.
+Some of the configurations are specific to a vendor, others are generic and not
+tied to any vendor.
+
+While we won't explicitly work to break configurations not listed here, any
+configuration not listed here is not explicitly supported. If you use or ship
+libc++ under a configuration not listed here, you should work with the libc++
+maintainers to make it into a supported configuration and add it here.
+
+Similarly, adding any new configuration that's not already covered must be
+discussed with the libc++ maintainers as it entails a maintenance burden.
Index: libcxx/cmake/caches/Generic-ubsan.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-ubsan.cmake
@@ -0,0 +1,2 @@
+set(LLVM_USE_SANITIZER "Undefined" CACHE STRING "")
+set(LIBCXX_ABI_UNSTABLE ON CACHE BOOL "")
Index: libcxx/cmake/caches/Generic-tsan.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-tsan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "Thread" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-singlethreaded.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-singlethreaded.cmake
@@ -0,0 +1,3 @@
+set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
+set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
+set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
Index: libcxx/cmake/caches/Generic-noexceptions.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-noexceptions.cmake
@@ -0,0 +1,2 @@
+set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
Index: libcxx/cmake/caches/Generic-msan.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-msan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "MemoryWithOrigins" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-cxx2a.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-cxx2a.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++2a" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-cxx17.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-cxx17.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++17" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-cxx14.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-cxx14.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++14" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-cxx11.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-cxx11.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++11" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-cxx03.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-cxx03.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++03" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-asan.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-asan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "Address" CACHE STRING "")
Index: libcxx/cmake/caches/Generic-32bits.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/Generic-32bits.cmake
@@ -0,0 +1 @@
+set(LLVM_BUILD_32_BITS ON CACHE BOOL "")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81293.268908.patch
Type: text/x-patch
Size: 3969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200605/58e2b989/attachment-0001.bin>


More information about the libcxx-commits mailing list