aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-12-05 11:25:39 +0100
committerGitHub <noreply@github.com>2023-12-05 11:25:39 +0100
commitde7fdc5b54c229f05ddacc33a49203762cdb5f66 (patch)
treede588ddcd48f08d8a356725148a214b49bf2c041 /utils
parentb14094885077fb10ae688a4cae85f7cfee795fb3 (diff)
downloadllvm-de7fdc5b54c229f05ddacc33a49203762cdb5f66.zip
llvm-de7fdc5b54c229f05ddacc33a49203762cdb5f66.tar.gz
llvm-de7fdc5b54c229f05ddacc33a49203762cdb5f66.tar.bz2
Revert "[libc][NFC] Remove __support/bit.h and use __support/CPP/bit.h instead" (#74444)
Reverts llvm/llvm-project#73939 This broke libc-aarch64-ubuntu build bot https://lab.llvm.org/buildbot/#/builders/138/builds/56186
Diffstat (limited to 'utils')
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel19
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel6
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl1
3 files changed, 24 insertions, 2 deletions
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 24f0371..0b6e725 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -439,6 +439,7 @@ libc_support_library(
name = "__support_integer_utils",
hdrs = ["src/__support/integer_utils.h"],
deps = [
+ ":__support_bit",
":__support_common",
":__support_cpp_type_traits",
":__support_math_extras",
@@ -450,6 +451,7 @@ libc_support_library(
name = "__support_uint",
hdrs = ["src/__support/UInt.h"],
deps = [
+ ":__support_bit",
":__support_cpp_array",
":__support_cpp_limits",
":__support_cpp_optional",
@@ -535,8 +537,8 @@ libc_support_library(
"src/__support/str_to_float.h",
],
deps = [
+ ":__support_bit",
":__support_common",
- ":__support_cpp_bit",
":__support_cpp_limits",
":__support_cpp_optional",
":__support_ctype_utils",
@@ -586,6 +588,15 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_bit",
+ hdrs = ["src/__support/bit.h"],
+ deps = [
+ ":__support_cpp_type_traits",
+ ":__support_macros_attributes",
+ ],
+)
+
+libc_support_library(
name = "__support_math_extras",
hdrs = ["src/__support/math_extras.h"],
deps = [
@@ -599,8 +610,8 @@ libc_support_library(
name = "__support_fputil_generic_fmod",
hdrs = ["src/__support/FPUtil/generic/FMod.h"],
deps = [
+ ":__support_bit",
":__support_common",
- ":__support_cpp_bit",
":__support_cpp_limits",
":__support_cpp_type_traits",
":__support_fputil_fenv_impl",
@@ -672,6 +683,7 @@ libc_support_library(
hdrs = ["src/__support/FPUtil/FPBits.h"],
textual_hdrs = ["src/__support/FPUtil/x86_64/LongDoubleBits.h"],
deps = [
+ ":__support_bit",
":__support_common",
":__support_cpp_bit",
":__support_cpp_type_traits",
@@ -699,6 +711,7 @@ libc_support_library(
name = "__support_fputil_hypot",
hdrs = ["src/__support/FPUtil/Hypot.h"],
deps = [
+ ":__support_bit",
":__support_common",
":__support_cpp_bit",
":__support_cpp_type_traits",
@@ -769,6 +782,7 @@ libc_support_library(
name = "__support_fputil_sqrt",
hdrs = sqrt_hdrs,
deps = [
+ ":__support_bit",
":__support_common",
":__support_cpp_bit",
":__support_cpp_type_traits",
@@ -796,6 +810,7 @@ libc_support_library(
# doesn't support FMA, so they can't be compiled on their own.
textual_hdrs = fma_platform_hdrs,
deps = [
+ ":__support_bit",
":__support_cpp_bit",
":__support_cpp_type_traits",
":__support_fputil_fenv_impl",
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
index a973e65..23071c2 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
@@ -11,6 +11,12 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
libc_test(
+ name = "bit_test",
+ srcs = ["bit_test.cpp"],
+ deps = ["//libc:__support_bit"],
+)
+
+libc_test(
name = "math_extras_test",
srcs = ["math_extras_test.cpp"],
deps = ["//libc:__support_math_extras"],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
index 1dffafdd..2843270 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
@@ -25,6 +25,7 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
srcs = [test_name + ".cpp"] + hdrs,
libc_function_deps = ["//libc:func_name".replace("func_name", name)],
deps = [
+ "//libc:__support_bit",
"//libc:__support_fputil_basic_operations",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_float_properties",