[libcxx-commits] [libcxx] [libc++] Fix <charconv> not exporting std::errc (PR #146268)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 29 05:56:45 PDT 2025


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

`<charconv>` doesn't properly export `std::errc` with locales disabled, which causes the CI to fail. This fixed the modulemap to let `from_chars_result` export `std::errc`, like it's supposed to do.


>From 5a65a41025f27194c419bf6f06ef13f83eb6ce1e Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sun, 29 Jun 2025 14:55:39 +0200
Subject: [PATCH] [libc++] Fix <charconv> not exporting std::errc

---
 libcxx/include/module.modulemap.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in
index f878e15d70b1a..b00a8ebd54623 100644
--- a/libcxx/include/module.modulemap.in
+++ b/libcxx/include/module.modulemap.in
@@ -934,7 +934,10 @@ module std [system] {
     module chars_format               { header "__charconv/chars_format.h" }
     module from_chars_floating_point  { header "__charconv/from_chars_floating_point.h" }
     module from_chars_integral        { header "__charconv/from_chars_integral.h" }
-    module from_chars_result          { header "__charconv/from_chars_result.h" }
+    module from_chars_result          {
+      header "__charconv/from_chars_result.h"
+      export std.system_error.errc
+    }
     module tables                     { header "__charconv/tables.h" }
     module to_chars                   { header "__charconv/to_chars.h" }
     module to_chars_base_10           { header "__charconv/to_chars_base_10.h" }



More information about the libcxx-commits mailing list