[libc] [llvm] Fix bazel build issue caused in #166517 (PR #166734)

Karlo Basioli via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 01:57:17 PST 2025


https://github.com/basioli-k created https://github.com/llvm/llvm-project/pull/166734

None

>From 2d578e2991a03fde3eb88a931f727de313dfd8c8 Mon Sep 17 00:00:00 2001
From: basioli-k <k.basioli at gmail.com>
Date: Thu, 6 Nov 2025 09:56:40 +0000
Subject: [PATCH] Fix bazel build issue caused in #166517

---
 .../CPP/type_traits/is_destructible.h         |  1 +
 .../llvm-project-overlay/libc/BUILD.bazel     | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/libc/src/__support/CPP/type_traits/is_destructible.h b/libc/src/__support/CPP/type_traits/is_destructible.h
index 7ada2235b4e73..dc5e62b32dce0 100644
--- a/libc/src/__support/CPP/type_traits/is_destructible.h
+++ b/libc/src/__support/CPP/type_traits/is_destructible.h
@@ -15,6 +15,7 @@
 #include "src/__support/CPP/type_traits/remove_all_extents.h"
 #include "src/__support/CPP/type_traits/true_type.h"
 #include "src/__support/CPP/type_traits/type_identity.h"
+#include "src/__support/CPP/utility/declval.h"
 #include "src/__support/macros/attributes.h"
 #include "src/__support/macros/config.h"
 
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index b65fe64acdea0..b11d1464eb035 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -6513,6 +6513,27 @@ libc_support_library(
     ],
 )
 
+libc_support_library(
+    name = "printf_error_mapper",
+    hdrs = [
+        "src/stdio/printf_core/error_mapper.h",
+    ] + select({
+        "@platforms//os:linux": [
+            "src/stdio/printf_core/linux/error_mapper.h",
+        ],
+        "//conditions:default": [
+            "src/stdio/printf_core/generic/error_mapper.h",
+        ],
+    }),
+    deps = [
+        ":hdr_errno_macros",
+        ":printf_core_structs",
+        ":__support_cpp_type_traits",
+        ":__support_error_or",
+        ":__support_macros_properties_architectures",
+    ]
+)
+
 libc_support_library(
     name = "printf_main",
     hdrs = ["src/stdio/printf_core/printf_main.h"],
@@ -6520,6 +6541,7 @@ libc_support_library(
         ":__support_arg_list",
         ":printf_converter",
         ":printf_core_structs",
+        ":printf_error_mapper",
         ":printf_parser",
         ":printf_writer",
     ],



More information about the llvm-commits mailing list