Workaround to fix toolchain resolution for local_jdk.

https://android-review.googlesource.com/c/platform/build/bazel/+/1657841
added custom platform definitions for Bazel in AOSP in
//build/bazel/platforms, and also added a custom --host_platform using
these definitions. Unfortunately, that CL broke toolchain resolution for
Bazel's local_jdk (the checked-in JDK) because it was resolving to
constraint_values in @platforms, not //build/bazel/platforms. This CL
makes those constraint values aliases to the original ones in @platforms
to make toolchain resolution continue to succeed.

Sample error:

```
ERROR: While resolving toolchains for target @bazel_tools//tools/jdk:remote_jdk11: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type
ERROR: Analysis of target '@bazel_tools//tools/jdk:JacocoCoverage' failed; build aborted: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type
```

Test: bazel build @bazel_tools//tools/jdk:JacocoCoverage (a java tool) before and after this change
Fixes: 184728647

Change-Id: If79c68788e7acee1cd065076e6c110a7b8f65b9a
3 files changed
tree: e8e77b2aaf799e3d0ec2c09d2c14f0b4e7d29b33
  1. bazel_skylib/
  2. docs/
  3. examples/
  4. json_module_graph/
  5. platforms/
  6. product_variables/
  7. rules/
  8. rules_cc/
  9. scripts/
  10. bazel.BUILD
  11. bazel.sh
  12. bazel.WORKSPACE
  13. common.bazelrc
  14. darwin.bazelrc
  15. linux.bazelrc
  16. OWNERS
  17. README.md
README.md

Bazel

The code in this directory is experimental. Bazel support for Android Platform is undergoing active development and workflow stability is currently not guaranteed.