[libcxx-commits] [libcxx] [libc++] Don't try to be compatible with libstdc++ in __libcpp_refstring on iOS (PR #170816)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 5 00:50:57 PST 2025


https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/170816

iOS doesn't provide a libstdc++ dylib anymore, so we can remove the compatiblity check whether we can load the dylib.


>From 14c989968a92ef5ced56f6643fc13db6f77d1e0c Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 5 Dec 2025 09:44:25 +0100
Subject: [PATCH] [libc++] Don't try to be compatible with libstdc++ in
 __libcpp_refstring on iOS

---
 libcxx/src/include/refstring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/src/include/refstring.h b/libcxx/src/include/refstring.h
index 3e0ec7a97c7be..ab3d9025088b5 100644
--- a/libcxx/src/include/refstring.h
+++ b/libcxx/src/include/refstring.h
@@ -25,7 +25,7 @@
 // string singleton before manipulating the reference count. This is done so that
 // if an exception is created with a zero-length string in libstdc++, libc++abi
 // won't try to delete the memory.
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
 #  define _LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE
 #  include <dlfcn.h>
 #  include <mach-o/dyld.h>



More information about the libcxx-commits mailing list