[libc-commits] [libc] [libc] fix another build failure from using limits.h (PR #84827)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Mon Mar 11 14:10:47 PDT 2024
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/84827
>From fcc98adee4c6c37bb47003ae177a4b161d5ef669 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Mon, 11 Mar 2024 13:34:14 -0700
Subject: [PATCH 1/2] [libc] fix another build failure from using limits.h
My GCC build is failing with issues similar why we added our own. Looks like
we missed one spot. See also:
commit 72ce62941579 ("[libc] Add C23 limits.h header. (#78887)")
---
libc/test/src/__support/integer_to_string_test.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libc/test/src/__support/integer_to_string_test.cpp b/libc/test/src/__support/integer_to_string_test.cpp
index a2a80c81b9f69f..270fddd828b680 100644
--- a/libc/test/src/__support/integer_to_string_test.cpp
+++ b/libc/test/src/__support/integer_to_string_test.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
+#include "src/__support/CPP/limits.h"
#include "src/__support/CPP/span.h"
#include "src/__support/CPP/string_view.h"
#include "src/__support/UInt.h"
@@ -15,8 +16,6 @@
#include "test/UnitTest/Test.h"
-#include "limits.h"
-
using LIBC_NAMESPACE::IntegerToString;
using LIBC_NAMESPACE::cpp::span;
using LIBC_NAMESPACE::cpp::string_view;
>From 2474e277bcc8289162705e613e87520f45931c2b Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Mon, 11 Mar 2024 14:10:36 -0700
Subject: [PATCH 2/2] add cmake
---
libc/test/src/__support/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index 91dd0dc4decfe0..51b897f8b595a8 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -78,6 +78,7 @@ add_libc_test(
SRCS
integer_to_string_test.cpp
DEPENDS
+ libc.src.__support.CPP.limits
libc.src.__support.CPP.string_view
libc.src.__support.integer_literals
libc.src.__support.integer_to_string
More information about the libc-commits
mailing list