File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,6 +150,8 @@ def _rust_doc_test_impl(ctx):
150150 "--test" ,
151151 ]
152152
153+ rustdoc_flags .extend (ctx .attr .rustdoc_flags )
154+
153155 action = rustdoc_compile_action (
154156 ctx = ctx ,
155157 toolchain = toolchain ,
@@ -216,6 +218,16 @@ rust_doc_test = rule(
216218 cfg = "exec" ,
217219 providers = [rust_common .crate_info ],
218220 ),
221+ "rustdoc_flags" : attr .string_list (
222+ doc = dedent ("""\
223+ List of flags passed to `rustdoc`.
224+
225+ These strings are subject to Make variable expansion for predefined
226+ source/output path variables like `$location`, `$execpath`, and
227+ `$rootpath`. This expansion is useful if you wish to pass a generated
228+ file of arguments to rustc: `@$(location //package:target)`.
229+ """ ),
230+ ),
219231 "_process_wrapper" : attr .label (
220232 doc = "A process wrapper for running rustdoc on all platforms" ,
221233 cfg = "exec" ,
You can’t perform that action at this time.
0 commit comments