-
Notifications
You must be signed in to change notification settings - Fork 14.3k
bazel build: pass __support_macros_config dep explicitly (NFCI) #98999
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
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
@llvm/pr-subscribers-libc Author: Krasimir Georgiev (krasimirgg) ChangesPassing it explicitly makes it that it's not made available to targets that don't need it (also we've got some internal integration that trips on it being passed implicitly in the rule definition). Full diff: https://github.com/llvm/llvm-project/pull/98999.diff 6 Files Affected:
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 919eea6175707..5d47f4a9cd640 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -254,6 +254,7 @@ libc_support_library(
hdrs = ["src/__support/macros/optimization.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":__support_macros_properties_compiler",
],
)
@@ -261,6 +262,9 @@ libc_support_library(
libc_support_library(
name = "__support_macros_sanitizer",
hdrs = ["src/__support/macros/sanitizer.h"],
+ deps = [
+ ":__support_macros_config",
+ ],
)
libc_support_library(
@@ -271,6 +275,7 @@ libc_support_library(
],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":__support_macros_properties_architectures",
],
)
@@ -280,6 +285,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/algorithm.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -317,6 +323,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/bitset.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -334,6 +341,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/expected.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -424,6 +432,7 @@ libc_support_library(
],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":__support_macros_properties_types",
":llvm_libc_macros_stdfix_macros",
],
@@ -573,7 +582,10 @@ libc_support_library(
libc_support_library(
name = "__support_str_to_num_result",
hdrs = ["src/__support/str_to_num_result.h"],
- deps = [":__support_macros_attributes"],
+ deps = [
+ ":__support_macros_attributes",
+ ":__support_macros_config",
+ ],
)
libc_support_library(
@@ -612,7 +624,10 @@ libc_support_library(
libc_support_library(
name = "__support_ctype_utils",
hdrs = ["src/__support/ctype_utils.h"],
- deps = [":__support_macros_attributes"],
+ deps = [
+ ":__support_macros_attributes",
+ ":__support_macros_config",
+ ],
)
libc_support_library(
@@ -785,6 +800,7 @@ libc_support_library(
hdrs = ["src/__support/FPUtil/rounding_mode.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":hdr_fenv_macros",
],
)
@@ -1126,6 +1142,7 @@ libc_support_library(
hdrs = ["src/__support/threads/sleep.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -3408,9 +3425,9 @@ libc_support_library(
":__support_arg_list",
":__support_file_file",
":__support_macros_attributes",
- ":types_FILE",
":printf_main",
":printf_writer",
+ ":types_FILE",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
index cc732effb243e..ec3714407cb91 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
@@ -43,7 +43,7 @@ def _libc_library(name, hidden, copts = [], deps = [], local_defines = [], **kwa
name = name,
copts = copts + libc_common_copts(),
local_defines = local_defines + LIBC_CONFIGURE_OPTIONS,
- deps = deps + ["//libc:__support_macros_config"],
+ deps = deps,
linkstatic = 1,
**kwargs
)
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 6126a4a8fca83..3e130cd9dc6f0 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
@@ -18,6 +18,7 @@ libc_support_library(
"//libc:__support_big_int",
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_types",
"//libc:__support_osutil_io",
"//libc:__support_uint128",
@@ -52,6 +53,7 @@ libc_support_library(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_architectures",
"//libc:__support_macros_properties_types",
"//libc:__support_stringutil",
@@ -89,10 +91,11 @@ libc_support_library(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_architectures",
+ "//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
- "//libc:hdr_fenv_macros",
- "//libc:types_fenv_t",
+ "//libc:types_fenv_t",
],
)
@@ -110,6 +113,7 @@ libc_support_library(
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_type_traits",
+ "//libc:__support_macros_config",
],
)
@@ -125,6 +129,7 @@ libc_support_library(
":LibcUnitTest",
":string_utils",
"//libc:__support_fputil_fp_bits",
+ "//libc:__support_macros_config",
"//libc:printf_core_structs",
],
)
@@ -138,5 +143,6 @@ libc_support_library(
"//libc:__support_big_int",
"//libc:__support_cpp_string",
"//libc:__support_cpp_type_traits",
+ "//libc:__support_macros_config",
],
)
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 2940326d5bfc3..57e3f9f6e9458 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
@@ -298,8 +298,8 @@ libc_support_library(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_manipulation_functions",
"//libc:hdr_math_macros",
- "//libc/test/UnitTest:fp_test_helpers",
"//libc/test/UnitTest:LibcUnitTest",
+ "//libc/test/UnitTest:fp_test_helpers",
],
)
@@ -559,7 +559,10 @@ math_test(
libc_support_library(
name = "sdcomp26094",
hdrs = ["sdcomp26094.h"],
- deps = ["//libc:__support_cpp_array"],
+ deps = [
+ "//libc:__support_cpp_array",
+ "//libc:__support_macros_config",
+ ],
)
math_test(
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
index fb0046e9f89d1..b11bf163473be 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
@@ -121,6 +121,7 @@ libc_support_library(
deps = [
"//libc:__support_cpp_span",
"//libc:__support_libc_assert",
+ "//libc:__support_macros_config",
"//libc:__support_macros_sanitizer",
"//libc:string_memory_utils",
],
diff --git a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
index c708f008dec2c..adf4b235b1b5e 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
@@ -48,6 +48,7 @@ libc_support_library(
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_types",
"//libc:hdr_math_macros",
"//libc/test/UnitTest:LibcUnitTest",
|
yuxuanchen1997
pushed a commit
that referenced
this pull request
Jul 25, 2024
Summary: Passing it explicitly makes it that it's not made available to targets that don't need it (also we've got some internal integration that trips on it being passed implicitly in the rule definition). Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251590
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.
Passing it explicitly makes it that it's not made available to targets that don't need it (also we've got some internal integration that trips on it being passed implicitly in the rule definition).