File tree Expand file tree Collapse file tree 5 files changed +28
-18
lines changed Expand file tree Collapse file tree 5 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ erlang_app_info = rule(
6666 "app" : attr .label (allow_files = [".app" ]),
6767 "beam" : attr .label_list (
6868 allow_files = [".beam" , ".appup" ],
69- cfg = beam_transition ,
69+ # cfg = beam_transition,
7070 ),
7171 "priv" : attr .label_list (allow_files = True ),
7272 "license_files" : attr .label_list (allow_files = True ),
7373 "srcs" : attr .label_list (allow_files = True ),
7474 "deps" : attr .label_list (providers = [ErlangAppInfo ]),
75- "_allowlist_function_transition" : attr .label (
76- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
77- ),
75+ # "_allowlist_function_transition": attr.label(
76+ # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
77+ # ),
7878 },
7979)
Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ ErlcOptsInfo = provider(
1616 },
1717)
1818
19+ def _transition_impl (settings , attr ):
20+ return {"//command_line_option:cpu" : "beam" }
21+
22+ transition = transition (
23+ implementation = _transition_impl ,
24+ inputs = [],
25+ outputs = ["//command_line_option:cpu" ],
26+ )
27+
1928def _impl (ctx ):
2029 if len (ctx .attr .outs ) == 0 :
2130 fail ("attr outs must not be empty" )
122131
123132erlang_bytecode = rule (
124133 implementation = _impl ,
134+ cfg = transition ,
125135 attrs = {
126136 "app_name" : attr .string (),
127137 "hdrs" : attr .label_list (
@@ -133,7 +143,7 @@ erlang_bytecode = rule(
133143 ),
134144 "beam" : attr .label_list (
135145 allow_files = [".beam" ],
136- cfg = beam_transition ,
146+ # cfg = beam_transition,
137147 ),
138148 "deps" : attr .label_list (
139149 providers = [ErlangAppInfo ],
Original file line number Diff line number Diff line change @@ -123,12 +123,12 @@ escript_archive = rule(
123123 "srcs" : attr .label_list (allow_files = [".erl" ]),
124124 "beam" : attr .label_list (
125125 allow_files = [".beam" ],
126- cfg = beam_transition ,
126+ # cfg = beam_transition,
127127 ),
128128 "app" : attr .label (providers = [ErlangAppInfo ]),
129- "_allowlist_function_transition" : attr .label (
130- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
131- ),
129+ # "_allowlist_function_transition": attr.label(
130+ # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
131+ # ),
132132 },
133133 toolchains = ["//tools:toolchain_type" ],
134134 executable = True ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ halt().
3131 body = body ,
3232 ))
3333
34- (erlang_home , erlang_release_dir , runfiles ) = erlang_dirs (ctx )
34+ (erlang_home , _ , runfiles ) = erlang_dirs (ctx )
3535
3636 inputs = depset (
3737 direct = ctx .files .src + ctx .files .beam ,
@@ -67,12 +67,12 @@ escript_flat = rule(
6767 ),
6868 "beam" : attr .label (
6969 allow_single_file = [".beam" ],
70- cfg = beam_transition ,
70+ # cfg = beam_transition,
7171 ),
7272 "out" : attr .string (),
73- "_allowlist_function_transition" : attr .label (
74- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
75- ),
73+ # "_allowlist_function_transition": attr.label(
74+ # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
75+ # ),
7676 },
7777 toolchains = ["//tools:toolchain_type" ],
7878)
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ eunit_test = rule(
179179 "is_windows" : attr .bool (mandatory = True ),
180180 "compiled_suites" : attr .label_list (
181181 allow_files = [".beam" ],
182- cfg = beam_transition ,
182+ # cfg = beam_transition,
183183 ),
184184 "eunit_mods" : attr .string_list (),
185185 "target" : attr .label (providers = [ErlangAppInfo ]),
@@ -189,9 +189,9 @@ eunit_test = rule(
189189 "deps" : attr .label_list (providers = [ErlangAppInfo ]),
190190 "tools" : attr .label_list (),
191191 "test_env" : attr .string_dict (),
192- "_allowlist_function_transition" : attr .label (
193- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
194- ),
192+ # "_allowlist_function_transition": attr.label(
193+ # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
194+ # ),
195195 },
196196 toolchains = ["//tools:toolchain_type" ],
197197 test = True ,
You can’t perform that action at this time.
0 commit comments