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