Skip to content

Commit dcf30d3

Browse files
authored
bazel build: pass __support_macros_config dep explicitly (NFCI) (#98999)
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).
1 parent f091848 commit dcf30d3

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,17 @@ libc_support_library(
254254
hdrs = ["src/__support/macros/optimization.h"],
255255
deps = [
256256
":__support_macros_attributes",
257+
":__support_macros_config",
257258
":__support_macros_properties_compiler",
258259
],
259260
)
260261

261262
libc_support_library(
262263
name = "__support_macros_sanitizer",
263264
hdrs = ["src/__support/macros/sanitizer.h"],
265+
deps = [
266+
":__support_macros_config",
267+
],
264268
)
265269

266270
libc_support_library(
@@ -271,6 +275,7 @@ libc_support_library(
271275
],
272276
deps = [
273277
":__support_macros_attributes",
278+
":__support_macros_config",
274279
":__support_macros_properties_architectures",
275280
],
276281
)
@@ -280,6 +285,7 @@ libc_support_library(
280285
hdrs = ["src/__support/CPP/algorithm.h"],
281286
deps = [
282287
":__support_macros_attributes",
288+
":__support_macros_config",
283289
],
284290
)
285291

@@ -317,6 +323,7 @@ libc_support_library(
317323
hdrs = ["src/__support/CPP/bitset.h"],
318324
deps = [
319325
":__support_macros_attributes",
326+
":__support_macros_config",
320327
],
321328
)
322329

@@ -334,6 +341,7 @@ libc_support_library(
334341
hdrs = ["src/__support/CPP/expected.h"],
335342
deps = [
336343
":__support_macros_attributes",
344+
":__support_macros_config",
337345
],
338346
)
339347

@@ -424,6 +432,7 @@ libc_support_library(
424432
],
425433
deps = [
426434
":__support_macros_attributes",
435+
":__support_macros_config",
427436
":__support_macros_properties_types",
428437
":llvm_libc_macros_stdfix_macros",
429438
],
@@ -573,7 +582,10 @@ libc_support_library(
573582
libc_support_library(
574583
name = "__support_str_to_num_result",
575584
hdrs = ["src/__support/str_to_num_result.h"],
576-
deps = [":__support_macros_attributes"],
585+
deps = [
586+
":__support_macros_attributes",
587+
":__support_macros_config",
588+
],
577589
)
578590

579591
libc_support_library(
@@ -612,7 +624,10 @@ libc_support_library(
612624
libc_support_library(
613625
name = "__support_ctype_utils",
614626
hdrs = ["src/__support/ctype_utils.h"],
615-
deps = [":__support_macros_attributes"],
627+
deps = [
628+
":__support_macros_attributes",
629+
":__support_macros_config",
630+
],
616631
)
617632

618633
libc_support_library(
@@ -785,6 +800,7 @@ libc_support_library(
785800
hdrs = ["src/__support/FPUtil/rounding_mode.h"],
786801
deps = [
787802
":__support_macros_attributes",
803+
":__support_macros_config",
788804
":hdr_fenv_macros",
789805
],
790806
)
@@ -1126,6 +1142,7 @@ libc_support_library(
11261142
hdrs = ["src/__support/threads/sleep.h"],
11271143
deps = [
11281144
":__support_macros_attributes",
1145+
":__support_macros_config",
11291146
],
11301147
)
11311148

@@ -3408,9 +3425,9 @@ libc_support_library(
34083425
":__support_arg_list",
34093426
":__support_file_file",
34103427
":__support_macros_attributes",
3411-
":types_FILE",
34123428
":printf_main",
34133429
":printf_writer",
3430+
":types_FILE",
34143431
],
34153432
)
34163433

utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _libc_library(name, hidden, copts = [], deps = [], local_defines = [], **kwa
4343
name = name,
4444
copts = copts + libc_common_copts(),
4545
local_defines = local_defines + LIBC_CONFIGURE_OPTIONS,
46-
deps = deps + ["//libc:__support_macros_config"],
46+
deps = deps,
4747
linkstatic = 1,
4848
**kwargs
4949
)

utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ libc_support_library(
1818
"//libc:__support_big_int",
1919
"//libc:__support_cpp_string",
2020
"//libc:__support_cpp_string_view",
21+
"//libc:__support_macros_config",
2122
"//libc:__support_macros_properties_types",
2223
"//libc:__support_osutil_io",
2324
"//libc:__support_uint128",
@@ -52,6 +53,7 @@ libc_support_library(
5253
"//libc:__support_fputil_fp_bits",
5354
"//libc:__support_fputil_fpbits_str",
5455
"//libc:__support_fputil_rounding_mode",
56+
"//libc:__support_macros_config",
5557
"//libc:__support_macros_properties_architectures",
5658
"//libc:__support_macros_properties_types",
5759
"//libc:__support_stringutil",
@@ -89,10 +91,11 @@ libc_support_library(
8991
"//libc:__support_fputil_fp_bits",
9092
"//libc:__support_fputil_fpbits_str",
9193
"//libc:__support_fputil_rounding_mode",
94+
"//libc:__support_macros_config",
9295
"//libc:__support_macros_properties_architectures",
96+
"//libc:hdr_fenv_macros",
9397
"//libc:hdr_math_macros",
94-
"//libc:hdr_fenv_macros",
95-
"//libc:types_fenv_t",
98+
"//libc:types_fenv_t",
9699
],
97100
)
98101

@@ -110,6 +113,7 @@ libc_support_library(
110113
"//libc:__support_cpp_bitset",
111114
"//libc:__support_cpp_span",
112115
"//libc:__support_cpp_type_traits",
116+
"//libc:__support_macros_config",
113117
],
114118
)
115119

@@ -125,6 +129,7 @@ libc_support_library(
125129
":LibcUnitTest",
126130
":string_utils",
127131
"//libc:__support_fputil_fp_bits",
132+
"//libc:__support_macros_config",
128133
"//libc:printf_core_structs",
129134
],
130135
)
@@ -138,5 +143,6 @@ libc_support_library(
138143
"//libc:__support_big_int",
139144
"//libc:__support_cpp_string",
140145
"//libc:__support_cpp_type_traits",
146+
"//libc:__support_macros_config",
141147
],
142148
)

utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ libc_support_library(
298298
"//libc:__support_fputil_fp_bits",
299299
"//libc:__support_fputil_manipulation_functions",
300300
"//libc:hdr_math_macros",
301-
"//libc/test/UnitTest:fp_test_helpers",
302301
"//libc/test/UnitTest:LibcUnitTest",
302+
"//libc/test/UnitTest:fp_test_helpers",
303303
],
304304
)
305305

@@ -559,7 +559,10 @@ math_test(
559559
libc_support_library(
560560
name = "sdcomp26094",
561561
hdrs = ["sdcomp26094.h"],
562-
deps = ["//libc:__support_cpp_array"],
562+
deps = [
563+
"//libc:__support_cpp_array",
564+
"//libc:__support_macros_config",
565+
],
563566
)
564567

565568
math_test(

utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ libc_support_library(
121121
deps = [
122122
"//libc:__support_cpp_span",
123123
"//libc:__support_libc_assert",
124+
"//libc:__support_macros_config",
124125
"//libc:__support_macros_sanitizer",
125126
"//libc:string_memory_utils",
126127
],

utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ libc_support_library(
4848
"//libc:__support_cpp_type_traits",
4949
"//libc:__support_fputil_fp_bits",
5050
"//libc:__support_fputil_fpbits_str",
51+
"//libc:__support_macros_config",
5152
"//libc:__support_macros_properties_types",
5253
"//libc:hdr_math_macros",
5354
"//libc/test/UnitTest:LibcUnitTest",

0 commit comments

Comments
 (0)