David Turner would like Owners Override to review this change.
[fx] Implement `fx bazel-tool set_gn_targets` command.
Implement a new `fx bazel-tool` command that can be used
to switch the @gn_targets symlink to the content matching
a given Bazel target.
This is required to invoke `fx bazel build` command directly
for any Bazel target that is wrapped by the same GN
bazel_action() target.
For example, for a workbench_eng.x64 build, the command:
```
fx bazel-tool set_gn_targets //build/info:version --verbose
```
Will print something like:
```
Bazel target //build/info:version is a dependency of GN target //products/workbench:workbench_eng.x64_bazel_build_group
Which builds the following bazel targets:
//products/workbench:assembly_eng.x64_product_assembly
//products/workbench:assembly_eng.x64
//products/workbench:elf_sizes.x64
//products/workbench:product_bundle_eng.x64
@gn_targets now points to /work/fuchsia/out/default/obj/products/workbench/workbench_eng.x64_bazel_build_group.gn_targets
```
+ Add workspace_utils.GN_TARGETS_DIR_SYMLINK
+ Make //build/OWNERS owners of //scripts/bazel_tool.py
Fixed: 341258445
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Owners-Override | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[fx] Implement `fx bazel-tool set_gn_targets` command.
Implement a new `fx bazel-tool` command that can be used
to switch the @gn_targets symlink to the content matching
a given Bazel target.
This is required to invoke `fx bazel build` command directly
for any Bazel target that is wrapped by the same GN
bazel_action() target.
For example, for a workbench_eng.x64 build, the command:
```
fx bazel-tool set_gn_targets //build/info:version --verbose
```
Will print something like:
```
Bazel target //build/info:version is a dependency of GN target //products/workbench:workbench_eng.x64_bazel_build_group
Which builds the following bazel targets:
//products/workbench:assembly_eng.x64_product_assembly
//products/workbench:assembly_eng.x64
//products/workbench:elf_sizes.x64
//products/workbench:product_bundle_eng.x64
@gn_targets now points to /work/fuchsia/out/default/obj/products/workbench/workbench_eng.x64_bazel_build_group.gn_targets
```
+ Add workspace_utils.GN_TARGETS_DIR_SYMLINK
+ Make //build/OWNERS owners of //scripts/bazel_tool.py
Fixed: 341258445
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Change has been successfully rolled: http://go/roll-cl/b00950f2c0fa1143982ed03f864d2b0c6b58ad59
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
David Turnerwould `build/scripts` be a good location for this as well?
David FangI would prefer `build/bazel/scripts/` in that case because this is tied very closely to our Bazel wrappers / implementation (and actually imports a module here already). Wdyt?
even better!