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" )
123132
124133erlang_bytecode = rule (
125134 implementation = _impl ,
135+ cfg = transition ,
126136 attrs = {
127137 "app_name" : attr .string (),
128138 "hdrs" : attr .label_list (
@@ -134,7 +144,7 @@ erlang_bytecode = rule(
134144 ),
135145 "beam" : attr .label_list (
136146 allow_files = [".beam" ],
137- cfg = beam_transition ,
147+ # cfg = beam_transition,
138148 ),
139149 "deps" : attr .label_list (
140150 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 @@ -178,7 +178,7 @@ eunit_test = rule(
178178 "is_windows" : attr .bool (mandatory = True ),
179179 "compiled_suites" : attr .label_list (
180180 allow_files = [".beam" ],
181- cfg = beam_transition ,
181+ # cfg = beam_transition,
182182 ),
183183 "eunit_mods" : attr .string_list (),
184184 "target" : attr .label (providers = [ErlangAppInfo ]),
@@ -191,9 +191,9 @@ eunit_test = rule(
191191 ),
192192 "tools" : attr .label_list (),
193193 "test_env" : attr .string_dict (),
194- "_allowlist_function_transition" : attr .label (
195- default = "@bazel_tools//tools/allowlists/function_transition_allowlist" ,
196- ),
194+ # "_allowlist_function_transition": attr.label(
195+ # default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
196+ # ),
197197 },
198198 toolchains = ["//tools:toolchain_type" ],
199199 test = True ,
You can’t perform that action at this time.
0 commit comments