[libcxx-commits] [libcxx] d9dec69 - [libc++][CMake] Add CMake caches for commonly supported configurations

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 9 11:52:21 PDT 2020


Author: Louis Dionne
Date: 2020-06-09T14:52:14-04:00
New Revision: d9dec697cbb7f825aa1b8e6336027675a01a0823

URL: https://github.com/llvm/llvm-project/commit/d9dec697cbb7f825aa1b8e6336027675a01a0823
DIFF: https://github.com/llvm/llvm-project/commit/d9dec697cbb7f825aa1b8e6336027675a01a0823.diff

LOG: [libc++][CMake] Add CMake caches for commonly supported configurations

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

Differential Revision: https://reviews.llvm.org/D81293

Added: 
    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

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libcxx/cmake/caches/Generic-32bits.cmake b/libcxx/cmake/caches/Generic-32bits.cmake
new file mode 100644
index 000000000000..ae7b2ac3e8d8
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-32bits.cmake
@@ -0,0 +1 @@
+set(LLVM_BUILD_32_BITS ON CACHE BOOL "")

diff  --git a/libcxx/cmake/caches/Generic-asan.cmake b/libcxx/cmake/caches/Generic-asan.cmake
new file mode 100644
index 000000000000..cf919765c3a2
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-asan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "Address" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-cxx03.cmake b/libcxx/cmake/caches/Generic-cxx03.cmake
new file mode 100644
index 000000000000..d1d67d86d74a
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-cxx03.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++03" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-cxx11.cmake b/libcxx/cmake/caches/Generic-cxx11.cmake
new file mode 100644
index 000000000000..e203c6aeaf29
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-cxx11.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++11" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-cxx14.cmake b/libcxx/cmake/caches/Generic-cxx14.cmake
new file mode 100644
index 000000000000..b1bf1244b510
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-cxx14.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++14" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-cxx17.cmake b/libcxx/cmake/caches/Generic-cxx17.cmake
new file mode 100644
index 000000000000..b23204729ced
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-cxx17.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++17" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-cxx2a.cmake b/libcxx/cmake/caches/Generic-cxx2a.cmake
new file mode 100644
index 000000000000..31f1b76ab91f
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-cxx2a.cmake
@@ -0,0 +1 @@
+set(LLVM_LIT_ARGS "--param std=c++2a" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-msan.cmake b/libcxx/cmake/caches/Generic-msan.cmake
new file mode 100644
index 000000000000..7c948f51642d
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-msan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "MemoryWithOrigins" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-noexceptions.cmake b/libcxx/cmake/caches/Generic-noexceptions.cmake
new file mode 100644
index 000000000000..f0dffef60dba
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-noexceptions.cmake
@@ -0,0 +1,2 @@
+set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")

diff  --git a/libcxx/cmake/caches/Generic-singlethreaded.cmake b/libcxx/cmake/caches/Generic-singlethreaded.cmake
new file mode 100644
index 000000000000..616baef1be7b
--- /dev/null
+++ b/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 "")

diff  --git a/libcxx/cmake/caches/Generic-tsan.cmake b/libcxx/cmake/caches/Generic-tsan.cmake
new file mode 100644
index 000000000000..a4b599e3e509
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-tsan.cmake
@@ -0,0 +1 @@
+set(LLVM_USE_SANITIZER "Thread" CACHE STRING "")

diff  --git a/libcxx/cmake/caches/Generic-ubsan.cmake b/libcxx/cmake/caches/Generic-ubsan.cmake
new file mode 100644
index 000000000000..7ad891e4aed9
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-ubsan.cmake
@@ -0,0 +1,2 @@
+set(LLVM_USE_SANITIZER "Undefined" CACHE STRING "")
+set(LIBCXX_ABI_UNSTABLE ON CACHE BOOL "")

diff  --git a/libcxx/cmake/caches/README.md b/libcxx/cmake/caches/README.md
new file mode 100644
index 000000000000..60837ee29401
--- /dev/null
+++ b/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.


        


More information about the libcxx-commits mailing list