[libcxx-commits] [libcxx] [libcxx] Export the formatter_integral for module build. (PR #131778)

Haojian Wu via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 18 03:49:25 PDT 2025


https://github.com/hokein created https://github.com/llvm/llvm-project/pull/131778

Chromium encounters another similar issue, https://crbug.com/400870610

Workaround #120108.

>From bc3d182de7e5536afda62babca559162fcc9dae7 Mon Sep 17 00:00:00 2001
From: Haojian Wu <hokein.wu at gmail.com>
Date: Tue, 18 Mar 2025 11:43:48 +0100
Subject: [PATCH] [libcxx] Export the formatter_integral for module build.

---
 libcxx/include/module.modulemap | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 43072aa0fb0f1..1dc1dc845cafd 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -926,7 +926,10 @@ module std [system] {
     module to_chars                   { header "__charconv/to_chars.h" }
     module to_chars_base_10           { header "__charconv/to_chars_base_10.h" }
     module to_chars_floating_point    { header "__charconv/to_chars_floating_point.h" }
-    module to_chars_integral          { header "__charconv/to_chars_integral.h" }
+    module to_chars_integral {
+      header "__charconv/to_chars_integral.h"
+      export *  // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108
+    }
     module to_chars_result            { header "__charconv/to_chars_result.h" }
     module traits                     { header "__charconv/traits.h" }
 
@@ -1316,7 +1319,10 @@ module std [system] {
     module formatter_char                     { header "__format/formatter_char.h" }
     module formatter_floating_point           { header "__format/formatter_floating_point.h" }
     module formatter_integer                  { header "__format/formatter_integer.h" }
-    module formatter_integral                 { header "__format/formatter_integral.h" }
+    module formatter_integral {
+      header "__format/formatter_integral.h"
+      export * // TODO: Workaround for https://github.com/llvm/llvm-project/issues/120108
+    }
     module formatter_output                   { header "__format/formatter_output.h" }
     module formatter_pointer                  { header "__format/formatter_pointer.h" }
     module formatter_string                   { header "__format/formatter_string.h" }



More information about the libcxx-commits mailing list