Skip to content

Commit cb069eb

Browse files
authored
[ATFE] Update LLVM libc++ patch to align with upstream changes in __config (#625)
Upstream LLVM introduced changes in libcxx/include/__config that overlap with the area modified by our patch 0001-Define-_LIBCPP_HAS_C8RTOMB_MBRTOC8.patch. As a result, the patch no longer applied cleanly during git am. This PR updates and rebases the patch to reflect the upstream modifications while preserving its original functionality. No functional change beyond re-aligning with upstream is intended. Upstream change: llvm/llvm-project#169405
1 parent 257538a commit cb069eb

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

arm-software/embedded/patches/llvm-project/0001-Define-_LIBCPP_HAS_C8RTOMB_MBRTOC8.patch

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 9011c0e821d5b1563dc2dc6370f29c529e55f41f Mon Sep 17 00:00:00 2001
2-
From: Victor Campos <victor.campos@arm.com>
3-
Date: Thu, 31 Oct 2024 09:58:34 +0000
1+
From 3f847ac6d71dbe36ddbda74c200f9cccb47bfb42 Mon Sep 17 00:00:00 2001
2+
From: Simi Pallipurath <simi.pallipurath@arm.com>
3+
Date: Wed, 26 Nov 2025 09:26:52 +0000
44
Subject: Define _LIBCPP_HAS_C8RTOMB_MBRTOC8
55

66
LLVM libcxx does not define the `char8_t` related functions, instead
@@ -19,14 +19,14 @@ time to implement a proper solution, one needs to create logic to detect
1919
the picolibc version and define the macro accordingly. The macros that
2020
govern picolibc version are in `picolibc.h`.
2121
---
22-
libcxx/include/__config | 17 ++---------------
23-
1 file changed, 2 insertions(+), 15 deletions(-)
22+
libcxx/include/__config | 13 ++-----------
23+
1 file changed, 2 insertions(+), 11 deletions(-)
2424

2525
diff --git a/libcxx/include/__config b/libcxx/include/__config
26-
index 1cf80a46686a..615433869a4e 100644
26+
index e758acfa870a..e8b9132c323a 100644
2727
--- a/libcxx/include/__config
2828
+++ b/libcxx/include/__config
29-
@@ -1021,21 +1021,8 @@ typedef __char32_t char32_t;
29+
@@ -820,17 +820,8 @@ typedef __char32_t char32_t;
3030
// functions is gradually being added to existing C libraries. The conditions
3131
// below check for known C library versions and conditions under which these
3232
// functions are declared by the C library.
@@ -36,12 +36,8 @@ index 1cf80a46686a..615433869a4e 100644
3636
-// the latter depends on internal GNU libc details that are not appropriate
3737
-// to depend on here, so any declarations present when __cpp_char8_t is not
3838
-// defined are ignored.
39-
-# if defined(_LIBCPP_GLIBC_PREREQ)
40-
-# if _LIBCPP_GLIBC_PREREQ(2, 36) && defined(__cpp_char8_t)
41-
-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
42-
-# else
43-
-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
44-
-# endif
39+
-# if _LIBCPP_GLIBC_PREREQ(2, 36) && defined(__cpp_char8_t)
40+
-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
4541
-# else
4642
-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
4743
-# endif
@@ -51,5 +47,5 @@ index 1cf80a46686a..615433869a4e 100644
5147
// There are a handful of public standard library types that are intended to
5248
// support CTAD but don't need any explicit deduction guides to do so. This
5349
--
54-
2.43.0
50+
2.34.1
5551

0 commit comments

Comments
 (0)