File tree Expand file tree Collapse file tree 8 files changed +1
-38
lines changed
attaching_transitions_to_rules
cc_binary_selectable_copts
transition_on_native_flag Expand file tree Collapse file tree 8 files changed +1
-38
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -52,12 +52,6 @@ shirt = rule(
5252 # Use a private attribute (one that is prefixed with "_") so that target writers
5353 # can't override the value.
5454 "_color" : attr .label (default = ":color" ),
55- # This attribute is required to use starlark transitions. It allows
56- # allowlisting usage of this rule. For more information, see
57- # https://bazel.build/extending/config#user-defined-transitions
58- "_allowlist_function_transition" : attr .label (
59- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
60- ),
6155 },
6256)
6357
Original file line number Diff line number Diff line change @@ -56,17 +56,6 @@ transition_rule = rule(
5656 # Note specificaly how it's configured with _copt_transition, which
5757 # ensures that setting propagates down the graph.
5858 "actual_binary" : attr .label (cfg = _copt_transition ),
59- # This is a stock Bazel requirement for any rule that uses Starlark
60- # transitions. It's okay to copy the below verbatim for all such rules.
61- #
62- # The purpose of this requirement is to give the ability to restrict
63- # which packages can invoke these rules, since Starlark transitions
64- # make much larger graphs possible that can have memory and performance
65- # consequences for your build. The allowlist defaults to "everything".
66- # But you can redefine it more strictly if you feel that's prudent.
67- "_allowlist_function_transition" : attr .label (
68- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
69- ),
7059 },
7160 # Making this executable means it works with "$ bazel run".
7261 executable = True ,
Original file line number Diff line number Diff line change 1- ### Example showing how to use [ Starlark configuration] ( https://bazel.build/extending/config ) to write a
2- ` cc_test ` wrapper with a starlark transition
1+ ### Example showing how to use [ Starlark configuration] ( https://bazel.build/extending/config ) to write a ` cc_test ` wrapper with a starlark transition
32
43the ` test_arg_cc_test ` macro in ` defs.bzl ` defines a wrapper for basically a ` cc_test ` that has been transitioned.
54This allows, e.g., the test itself to select attribute values based on the value of that transition. There is some
Original file line number Diff line number Diff line change @@ -32,9 +32,6 @@ transition_rule_test = rule(
3232 implementation = _test_transition_rule_impl ,
3333 attrs = {
3434 "actual_test" : attr .label (cfg = "target" , executable = True ),
35- "_allowlist_function_transition" : attr .label (
36- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
37- ),
3835 },
3936 test = True ,
4037)
Original file line number Diff line number Diff line change @@ -38,12 +38,6 @@ foo_binary = rule(
3838 implementation = _rule_impl ,
3939 attrs = {
4040 "tool" : attr .label (cfg = fat_transition ),
41- # This attribute is required to use Starlark transitions. It allows
42- # allowlisting usage of this rule. For more information, see
43- # https://bazel.build/extending/config#user-defined-transitions.
44- "_allowlist_function_transition" : attr .label (
45- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
46- ),
4741 },
4842)
4943
Original file line number Diff line number Diff line change @@ -28,8 +28,5 @@ my_rule = rule(
2828 attrs = {
2929 "do_transition" : attr .bool (),
3030 "_some_string" : attr .label (default = Label ("//read_attr_in_transition:some-string" )),
31- "_allowlist_function_transition" : attr .label (
32- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
33- ),
3431 },
3532)
Original file line number Diff line number Diff line change @@ -32,12 +32,6 @@ cpu_rule = rule(
3232 # the configuration of this target, which the target's descendents will inherit.
3333 cfg = cpu_transition ,
3434 attrs = {
35- # This attribute is required to use starlark transitions. It allows
36- # allowlisting usage of this rule. For more information, see
37- # https://bazel.build/extending/config#user-defined-transitions
38- "_allowlist_function_transition" : attr .label (
39- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
40- ),
4135 "cpu" : attr .string (default = "x86" ),
4236 },
4337)
You can’t perform that action at this time.
0 commit comments