-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[libc][bazel] unglob libc macros #85831
[libc][bazel] unglob libc macros #85831
Conversation
@llvm/pr-subscribers-libc Author: Michael Jones (michaelrj-google) ChangesIn a previous patch an "internal_includes" target was created to give Full diff: https://github.com/llvm/llvm-project/pull/85831.diff 4 Files Affected:
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 0ec8e350281df9..237e692e788a5d 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -65,11 +65,35 @@ config_setting(
################################# Include Files ################################
libc_support_library(
- name = "internal_includes",
- hdrs = glob([
- "include/llvm-libc-macros/*.h",
- "include/llvm-libc-types/*",
- ]),
+ name = "llvm_libc_macros_math_macros",
+ hdrs = ["include/llvm-libc-macros/math-macros.h"],
+)
+
+libc_support_library(
+ name = "llvm_libc_macros_limits_macros",
+ hdrs = ["include/llvm-libc-macros/limits-macros.h"],
+)
+
+libc_support_library(
+ name = "llvm_libc_macros_float_macros",
+ hdrs = ["include/llvm-libc-macros/float-macros.h"],
+)
+
+libc_support_library(
+ name = "llvm_libc_macros_stdint_macros",
+ hdrs = ["include/llvm-libc-macros/stdint-macros.h"],
+)
+
+libc_support_library(
+ name = "llvm_libc_macros_stdfix_macros",
+ hdrs = ["include/llvm-libc-macros/stdfix-macros.h"],
+ deps = [":llvm_libc_macros_float_macros"],
+)
+
+libc_support_library(
+ name = "llvm_libc_types_float128",
+ hdrs = ["include/llvm-libc-types/float128.h"],
+ deps = [":llvm_libc_macros_float_macros"],
)
############################### Support libraries ##############################
@@ -681,7 +705,7 @@ libc_support_library(
":__support_macros_properties_architectures",
":__support_macros_sanitizer",
":errno",
- ":internal_includes",
+ ":llvm_libc_macros_math_macros",
],
)
@@ -754,7 +778,7 @@ libc_support_library(
":__support_fputil_normal_float",
":__support_macros_optimization",
":__support_uint128",
- ":internal_includes",
+ ":llvm_libc_macros_math_macros",
],
)
@@ -768,7 +792,7 @@ libc_support_library(
":__support_fputil_fp_bits",
":__support_fputil_rounding_mode",
":__support_macros_attributes",
- ":internal_includes",
+ ":llvm_libc_macros_math_macros",
],
)
@@ -997,33 +1021,6 @@ libc_support_library(
],
)
-libc_support_library(
- name = "llvm_libc_macros_limits_macros",
- hdrs = ["include/llvm-libc-macros/limits-macros.h"],
-)
-
-libc_support_library(
- name = "llvm_libc_macros_float_macros",
- hdrs = ["include/llvm-libc-macros/float-macros.h"],
-)
-
-libc_support_library(
- name = "llvm_libc_macros_stdint_macros",
- hdrs = ["include/llvm-libc-macros/stdint-macros.h"],
-)
-
-libc_support_library(
- name = "llvm_libc_macros_stdfix_macros",
- hdrs = ["include/llvm-libc-macros/stdfix-macros.h"],
- deps = [":llvm_libc_macros_float_macros"],
-)
-
-libc_support_library(
- name = "llvm_libc_types_float128",
- hdrs = ["include/llvm-libc-types/float128.h"],
- deps = [":llvm_libc_macros_float_macros"],
-)
-
############################### errno targets ################################
libc_function(
@@ -1190,7 +1187,7 @@ libc_support_library(
"__support_cpp_type_traits",
":__support_common",
":errno",
- ":internal_includes",
+ ":llvm_libc_macros_math_macros",
],
)
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 15f66281860554..4f976122967c4d 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
@@ -89,7 +89,7 @@ libc_test(
"//libc:__support_cpp_optional",
"//libc:__support_macros_properties_types",
"//libc:__support_uint",
- "//libc:internal_includes",
+ "//libc:llvm_libc_macros_math_macros",
],
)
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 391b509854f998..ddd83f11e568f8 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
@@ -296,7 +296,7 @@ libc_support_library(
"//libc:__support_cpp_limits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_manipulation_functions",
- "//libc:internal_includes",
+ "//libc:llvm_libc_macros_math_macros",
"//libc/test/UnitTest:LibcUnitTest",
],
)
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 faab18a95095f1..1a5868d242e80a 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
@@ -34,7 +34,7 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
"//libc:__support_math_extras",
"//libc:__support_uint128",
"//libc/test/UnitTest:fp_test_helpers",
- "//libc:internal_includes",
+ "//libc:llvm_libc_macros_math_macros",
] + deps,
**kwargs
)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, there's also one in utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
In a previous patch an "internal_includes" target was created to give access to the macro headers. This patch removes that in favor of individual targets for these headers, better matching the existing code.
8b0fc9d
to
36bff40
Compare
Rebased and fixed the new issues. |
In a previous patch an "internal_includes" target was created to give access to the macro headers. This patch removes that in favor of individual targets for these headers, better matching the existing code.
In a previous patch an "internal_includes" target was created to give
access to the macro headers. This patch removes that in favor of
individual targets for these headers, better matching the existing code.