From 3d91caec4b73481b641b8862a655ced490b69443 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 26 May 2023 12:14:50 +0200 Subject: [PATCH] [bazel][libc] Adjust for 4f1fe19df385445fabde47998affca50c7f1bc1e This also required a build rule for error_to_string, so add that too. --- utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 33 ++++++++++++++++++++++ .../libc/test/UnitTest/BUILD.bazel | 5 ++++ 2 files changed, 38 insertions(+) diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index 599b8e5..8e29dfc 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -227,6 +227,17 @@ libc_support_library( ) libc_support_library( + name = "__support_cpp_stringstream", + hdrs = ["src/__support/CPP/stringstream.h"], + deps = [ + ":__support_cpp_span", + ":__support_cpp_string_view", + ":__support_cpp_type_traits", + ":__support_integer_to_string", + ], +) + +libc_support_library( name = "__support_cpp_string", hdrs = ["src/__support/CPP/string.h"], deps = [ @@ -806,6 +817,28 @@ libc_support_library( ) libc_support_library( + name = "__support_stringutil", + srcs = glob(["src/__support/StringUtil/tables/**/*.h"]) + [ + "src/__support/StringUtil/error_to_string.cpp", + "src/__support/StringUtil/message_mapper.h", + "src/__support/StringUtil/signal_to_string.cpp", + ], + hdrs = [ + "src/__support/StringUtil/error_to_string.h", + "src/__support/StringUtil/signal_to_string.h", + ], + deps = [ + ":__support_cpp_array", + ":__support_cpp_span", + ":__support_cpp_string_view", + ":__support_cpp_stringstream", + ":__support_integer_to_string", + ":errno", + ":libc_root", + ], +) + +libc_support_library( name = "__support_threads_mutex", hdrs = [ "src/__support/threads/mutex.h", diff --git a/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel index 7ab3fe1..49ab0ae 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel @@ -29,6 +29,7 @@ cc_library( "LibcTestMain.cpp", ], hdrs = [ + "ErrnoSetterMatcher.h", "ExecuteFunction.h", "LibcTest.h", "PlatformDefs.h", @@ -43,7 +44,11 @@ cc_library( "//libc:__support_cpp_string", "//libc:__support_cpp_string_view", "//libc:__support_cpp_type_traits", + "//libc:__support_fputil_fp_bits", + "//libc:__support_macros_properties_architectures", + "//libc:__support_stringutil", "//libc:__support_uint128", + "//libc:errno", "//libc:libc_root", "//llvm:Support", ], -- 2.7.4