javac 9 -target 1.9: Move bootclasspath jars onto classpath.

When building with OpenJDK 9's javac with -source 1.9 -target 1.9,
a runtime image (with system modules) is used via the --system
command line flag, instead of --bootclasspath.
The runtime image only contains the default libraries (libcore)
but is missing other libraries that might be on the bootclasspath
for a particular build target.

This CL fixes compilation for this case by adding the missing
jars onto the classpath instead.

This already used to work but was broken by CL [1]. I attempted
to conditionally revert some of that CL's changes to java_common.mk
for the case of language level 1.9, but couldn't get it to work.
Therefore this CL follows a different approach.

[1] http://r.android.com/519552

Bug: 38177569
Test: Treehugger
Test: Ran "EXPERIMENTAL_USE_OPENJDK9=true make checkbuild docs"
      and spot-checked some javac invocations to confirm that the
      system modules libs were not included in the bootclasspath,
      but other libs were.

Change-Id: I48fd11aac9b310bfa58dee0f9cfb3ef33f10bca8
2 files changed
tree: b2cf65aec9d4d41b4e8712b2e59267dff716f9dd
  1. core/
  2. target/
  3. tests/
  4. tools/
  5. .gitignore
  6. Android.mk
  7. buildspec.mk.default
  8. Changes.md
  9. CleanSpec.mk
  10. envsetup.sh
  11. help.sh
  12. navbar.md
  13. OWNERS
  14. README.md
  15. tapasHelp.sh
  16. Usage.txt
README.md

Android Make Build System

This is the Makefile-based portion of the Android Build System.

For documentation on how to run a build, see Usage.txt

For a list of behavioral changes useful for Android.mk writers see Changes.md

For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.

This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.