fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
c134a458
0.6.0
1"""Test transitions to test extra_exec_rustc_flags.""" 2 3def _extra_exec_rustc_flags_transition_impl ( _settings , attr ): 4return { 5"//:extra_exec_rustc_flags" : attr . extra_exec_rustc_flags , 6} 7 8_extra_exec_rustc_flags_transition = transition ( 9implementation = _extra_exec_rustc_flags_transition_impl , 10inputs = [], 11outputs = [ "//:extra_exec_rustc_flags" ], 12) 13 14def _with_extra_exec_rustc_flags_cfg_impl ( ctx ): 15return [ DefaultInfo ( files = depset ( ctx . files . srcs ))] 16 17with_extra_exec_rustc_flags_cfg = rule ( 18implementation = _with_extra_exec_rustc_flags_cfg_impl , 19attrs = { 20"extra_exec_rustc_flags" : attr . string_list ( 21mandatory = True , 22), 23"srcs" : attr . label_list ( 24allow_files = True , 25cfg = _extra_exec_rustc_flags_transition , 26), 27"_allowlist_function_transition" : attr . label ( 28default = Label ( "//tools/allowlists/function_transition_allowlist" ), 29), 30}, 31) 32 33def _with_exec_cfg_impl ( ctx ): 34return [ DefaultInfo ( files = depset ( ctx . files . srcs ))] 35 36with_exec_cfg = rule ( 37implementation = _with_exec_cfg_impl , 38attrs = { 39"srcs" : attr . label_list ( 40allow_files = True , 41cfg = "exec" , 42), 43}, 44)