-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[bazel][libc][NFC] Add missing layering deps #107947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After 2773719 e.g. ``` external/llvm-project/libc/test/src/math/smoke/NextTowardTest.h:12:10: error: module llvm-project//libc/test/src/math/smoke:nexttowardf_test does not depend on a module exporting 'src/__support/CPP/bit.h' ```
@llvm/pr-subscribers-libc Author: Jordan Rupprecht (rupprecht) ChangesAfter 2773719 e.g.
Full diff: https://github.com/llvm/llvm-project/pull/107947.diff 3 Files Affected:
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
index 9df23fe44c45a0..fcfc0ff9fda162 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
@@ -4,7 +4,6 @@
# Tests for LLVM libc math.h functions.
-load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test/src/math:libc_math_test_rules.bzl", "math_mpfr_test")
package(default_visibility = ["//visibility:public"])
@@ -53,6 +52,9 @@ math_mpfr_test(name = "cos")
math_mpfr_test(
name = "cosf",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
@@ -65,6 +67,9 @@ math_mpfr_test(
math_mpfr_test(
name = "cospif",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
@@ -107,7 +112,7 @@ math_mpfr_test(
name = "exp2m1f",
deps = [
"//libc:__support_cpp_array",
- ]
+ ],
)
math_mpfr_test(name = "expm1")
@@ -211,8 +216,8 @@ math_mpfr_test(
math_mpfr_test(
name = "hypotf",
hdrs = [
- "hypotf_hard_to_round.h",
"HypotTest.h",
+ "hypotf_hard_to_round.h",
],
)
@@ -297,16 +302,25 @@ math_mpfr_test(
math_mpfr_test(
name = "nearbyint",
hdrs = ["NearbyIntTest.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
name = "nearbyintf",
hdrs = ["NearbyIntTest.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
name = "nearbyintl",
hdrs = ["NearbyIntTest.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(name = "pow")
@@ -378,6 +392,9 @@ math_mpfr_test(name = "sin")
math_mpfr_test(
name = "sinf",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(name = "sincos")
@@ -385,18 +402,24 @@ math_mpfr_test(name = "sincos")
math_mpfr_test(
name = "sincosf",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
name = "sinhf",
deps = [
"//libc:__support_cpp_array",
- ]
+ ],
)
math_mpfr_test(
name = "sinpif",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(
@@ -419,6 +442,9 @@ math_mpfr_test(name = "tan")
math_mpfr_test(
name = "tanf",
hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
math_mpfr_test(name = "tanhf")
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 22e6f6578a1fc2..2601da2e659c15 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,8 +25,9 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
srcs = [test_name + ".cpp"] + hdrs,
libc_function_deps = ["//libc:func_name".replace("func_name", name)],
deps = [
- "//libc/test/UnitTest:fp_test_helpers",
"//libc:__support_cpp_algorithm",
+ "//libc:__support_cpp_bit",
+ "//libc:__support_cpp_limits",
"//libc:__support_fputil_basic_operations",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_fp_bits",
@@ -36,7 +37,10 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
"//libc:__support_macros_properties_architectures",
"//libc:__support_math_extras",
"//libc:__support_uint128",
+ "//libc:hdr_errno_macros",
+ "//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
+ "//libc/test/UnitTest:fp_test_helpers",
] + deps,
**kwargs
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index eb744b45243323..8f519e1a151179 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -4,7 +4,6 @@
# Smoke tests for LLVM libc math.h functions.
-load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test/src/math:libc_math_test_rules.bzl", "math_test")
package(default_visibility = ["//visibility:public"])
@@ -951,12 +950,7 @@ math_test(
hdrs = ["NextUpTest.h"],
)
-math_test(
- name = "pow",
- deps = [
- "//libc:hdr_fenv_macros",
- ],
-)
+math_test(name = "pow")
math_test(name = "powf")
@@ -1156,7 +1150,7 @@ math_test(
name = "sinhf",
deps = [
"//libc:__support_cpp_array",
- ]
+ ],
)
math_test(name = "sinpif")
|
Thanks for fixing these! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After 2773719
e.g.