Skip to content

Commit

Permalink
Make every _allowlist_function_transition explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
armandomontanez committed Jun 12, 2024
1 parent 2c2375b commit 1bfb629
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions bazel/util/transition.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ def declare_transtion(attrs, flag_overrides = None, append_to_flags = None, exec
executable = executable,
mandatory = True,
),
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
} | attrs,
)

rp2040_bootloader_binary = declare_transtion(
attrs = {
"_malloc": attr.label(default = "//bazel:empty_cc_lib"),
# This could be shared, but we don't in order to make it clearer that
# a transition is in use.
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
},
flag_overrides = {
# We don't want --custom_malloc to ever apply to the bootloader, so
Expand All @@ -92,6 +94,11 @@ kitchen_sink_test_binary = declare_transtion(
attrs = {
"bt_stack_config": attr.label(mandatory = True),
"lwip_config": attr.label(mandatory = True),
# This could be shared, but we don't in order to make it clearer that
# a transition is in use.
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
},
flag_overrides = {
"@pico-sdk//bazel/config:PICO_BTSTACK_CONFIG": "bt_stack_config",
Expand All @@ -102,6 +109,11 @@ kitchen_sink_test_binary = declare_transtion(
extra_copts_for_all_deps = declare_transtion(
attrs = {
"extra_copts": attr.string_list(),
# This could be shared, but we don't in order to make it clearer that
# a transition is in use.
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
},
append_to_flags = {
"//command_line_option:copt": "extra_copts",
Expand Down

0 comments on commit 1bfb629

Please sign in to comment.