[roll] Roll fuchsia [bazel][bazel_sdk] Work around for Bazel analysis bug.

Bazel has a subtle bug when aspects are mixed with dependency
paths between testonly and non-testonly targets. More precisely,
if a testonly target depends on a non-testonly one, Bazel injects
some undocumented TestTrimmingTransition transition calls between
them at analysis time.

This is supposed to remove the test-specific fragment from the
build configuration when reaching the non-testonly dependency.

*However*, this magic does not happen when aspects are used to
walk the same dependency chain.

This results in two instances of the same cc_library() being
created in the context of two different build configurations,
which only differ in values that do not affect the generated
actions _nor_ the location of their output artifacts.

Bazel then complains that two different actions are trying
to write to the same output file (e.g. `..../lib.pic.o`).

The only way to disable that is to use a specific command-line
option, which can be either [1] or [2], where the former is
considered less risky.

This CL ensures the flag is used in the .bazelrc files of
the workspaces for the Fuchsia platform build, and of the
Bazel SDK test suite.

OOT projects will have to add this option to their own
.bazelrc file, unfortunately :-/

+ Add a new Bazel SDK test that builds a Fuchsia test
  package that includes a test component using a
  fuchsia_cc_test() binary that depends on a non-testonly
  cc_library().

  For now, this test will pass even if the flag is not added
  to the .bazelrc, but this will no longer true in a future
  CL that changes the Bazel SDK rules logic to use aspects
  to collect unstripped binaries.

+ Add proper @com_google_googletest override when invoking
  Bazel SDK test suite with bazel_test.py script from the
  platform build.

[1] https://bazel.build/reference/command-line-reference#flag--experimental_retain_test_configuration_across_testonly
[2] https://bazel.build/reference/command-line-reference#flag--trim_test_configuration

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1047976
Original-Revision: 6f02e64a14ede2de15efc640eaeab6adf22ef139
GitOrigin-RevId: c9a7d3bdb902a31282b626af4e2cb1168e634b66
Change-Id: Ia48710b3648b43d22cfd11b951a625314999d327
1 file changed
tree: 97f5af460467aa2254f6c88eaa3d3156ea2e0df9
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. 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.