[libcxx-commits] [libcxxabi] [libcxx] [libc++] tests with picolibc: enable exceptions (PR #75462)

Dominik Wójt via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 14 02:55:21 PST 2023


https://github.com/domin144 created https://github.com/llvm/llvm-project/pull/75462

None

>From 4d87bac49291c19cc8cf871ac12f7dd252a624a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <dominik.wojt at arm.com>
Date: Fri, 1 Dec 2023 14:31:28 +0100
Subject: [PATCH] [libc++] tests with picolibc: enable exceptions

---
 libcxx/cmake/caches/Armv7M-picolibc.cmake         | 7 ++++---
 libcxxabi/test/catch_multi_level_pointer.pass.cpp | 4 ++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/libcxx/cmake/caches/Armv7M-picolibc.cmake b/libcxx/cmake/caches/Armv7M-picolibc.cmake
index 9f8863943444b6..91cc32fd376e30 100644
--- a/libcxx/cmake/caches/Armv7M-picolibc.cmake
+++ b/libcxx/cmake/caches/Armv7M-picolibc.cmake
@@ -13,17 +13,18 @@ set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
 set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
 set(LIBCXXABI_BAREMETAL ON CACHE BOOL "")
 set(LIBCXXABI_ENABLE_ASSERTIONS OFF CACHE BOOL "")
-set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+set(LIBCXXABI_ENABLE_EXCEPTIONS ON CACHE BOOL "")
 set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
 set(LIBCXXABI_ENABLE_STATIC ON CACHE BOOL "")
+set(LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
 set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
 set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
 set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
-set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+set(LIBCXX_ENABLE_EXCEPTIONS ON CACHE BOOL "")
 set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE STRING "")
 set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
 set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
-set(LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
+set(LIBCXX_ENABLE_RTTI ON CACHE BOOL "")
 set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
 set(LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
 set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
diff --git a/libcxxabi/test/catch_multi_level_pointer.pass.cpp b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
index 00ea66da301763..5f0e78a391b14c 100644
--- a/libcxxabi/test/catch_multi_level_pointer.pass.cpp
+++ b/libcxxabi/test/catch_multi_level_pointer.pass.cpp
@@ -11,6 +11,10 @@
 // 1b00fc5d8133 made it in the dylib in macOS 10.11
 // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10}}
 
+// mps2-an385 machine used for testing of picolibc has just 4 MB of "flash"
+// memory and this test requires almost 5 MB
+// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME
+
 #include <cassert>
 #include <cstdio>
 #include <cstdlib>



More information about the libcxx-commits mailing list