Skip to content

Commit a297813

Browse files
committed
update docs
1 parent 0386a70 commit a297813

2 files changed

Lines changed: 42 additions & 2 deletions

File tree

docs/api/rules_python/command_line_option/index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,38 @@
44
:::
55

66
# //command_line_option
7+
8+
This package provides special targets that correspond to the Bazel-builtin
9+
`//command_line_option` psuedo-targets. These can be used with the {obj}`config_settings`
10+
attribute on Python rules to transition specific command line flags for a target.
11+
12+
:::{note}
13+
These targets are not actual `alias()` targets, nor are they the actual builtin
14+
command line flags. They are regular targets that the `config_settings` transition
15+
logic specially recognizes and handles as if they were the builtin `//command_line_option`
16+
psuedo-targets.
17+
:::
18+
19+
:::{seealso}
20+
The `config_settings` attribute documentation on:
21+
* {obj}`py_binary.config_settings`
22+
* {obj}`py_test.config_settings`
23+
:::
24+
25+
## build_runfile_links
26+
27+
:::{bzl:target} build_runfile_links
28+
29+
Special target for the Bazel-builtin `//command_line_option:build_runfile_links` flag.
30+
31+
See the [Bazel documentation for --build_runfile_links](https://bazel.build/reference/command-line-reference#flag--build_runfile_links).
32+
:::
33+
34+
## enable_runfiles
35+
36+
:::{bzl:target} enable_runfiles
37+
38+
Special target for the Bazel-builtin `//command_line_option:enable_runfiles` flag.
39+
40+
See the [Bazel documentation for --enable_runfiles](https://bazel.build/reference/command-line-reference#flag--enable_runfiles).
41+
:::

python/private/attributes.bzl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,21 @@ versions of a library] for a more concrete example.
402402
403403
:::{important}
404404
Labels with package `command_line_option` are handled specially: they are treated
405-
as aliases for the Bazel-builtin `//command_line_option:<name>` psuedo-targets.
405+
as the Bazel-builtin `//command_line_option:<name>` psuedo-targets.
406406
407407
e.g. `@foo//command_line_option:NAME` will attempt to transition
408408
the Bazel-builtin `//command_line_option:NAME` setting.
409409
410410
See the {obj}`@rules_python//command_line_option` package for some predefined
411-
aliases, or define your own by putting them in your own `command_line_option`
411+
special targets, or define your own by putting them in your own `command_line_option`
412412
directory.
413413
:::
414414
415+
:::{seealso}
416+
* {obj}`//command_line_option:build_runfile_links`
417+
* {obj}`//command_line_option:enable_runfiles`
418+
:::
419+
415420
:::{note}
416421
These values are transitioned on, so will affect the analysis graph and the
417422
associated memory overhead. The more unique configurations in your overall

0 commit comments

Comments
 (0)