[llvm] [libc][bazel] unglob libc macros (PR #85831)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 10:39:33 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Michael Jones (michaelrj-google)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/85831.diff
4 Files Affected:
- (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+33-36)
- (modified) utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel (+1-1)
- (modified) utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel (+1-1)
- (modified) utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl (+1-1)
``````````diff
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
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/85831
More information about the llvm-commits
mailing list