[roll] Roll fuchsia [build][bazel] Generate proper depfile for bazel_action() targets.

This is a reland of [1] which was incorrectly reverted, since it
turned out that the root cause for the Ninja no-op failures was
different.

The main ideas behind this CL are:

- The bazel_action.py script, uses Bazel queries to determine
  the list of implicit inputs from a top-level Bazel target,
  which include both source files and build files.

- Input files that belong to Bazel external repositories must
  be mapped to locations outside of the Bazel output_base,
  the logic to do so is detailed in a long technical note
  in bazel_action.py and is ... sophisticated.

- update-workspace.py is updated to generate content hash
  files for many Bazel repositories. This was already the
  case for @fuchsia_sdk and @internal_sdk, but now there
  are also files for @fuchsia_clang, @prebuilt_clang,
  @com_google_googletest as well, and all files are now
  located under
  $BAZEL_TOPDIR/workspace/generated_repository_hashes/<repo_name>.hash

- Repository rules are updated to track said hash content
  files (by calling repository_ctx.path(), which is enough
  to force Bazel to record the association).

+ Remove `--bazel-platforms` option from bazel_action.py, just pass
  a `--platforms=<name>` extra Bazel argument instead.

+ Add @com_google_absl as local repository, as a transitive
  dependency of @com_google_googletest (required to avoid
  errors in Bazel queries).

Original-Bug: 117818

[1] https://fuchsia-review.googlesource.com/c/fuchsia/+/798682

NO_IFTTT=multiple_files_associated_with_single_change

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/808832
Original-Revision: 29c62fe2a43aa990fb49d3f18da207f1b975d28d
GitOrigin-RevId: 72747ecf542044d071b86e32527184d64f5c3608
Change-Id: I8ce7221413f4418a795da7a48d80caf4a107b3ed
1 file changed
tree: bcc26d67a54aa84f77092f8b7171ebdfe320c5ef
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
  14. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.