Fix vm-tests-ft for OpenJDK 9 toolchain.

vm-test-ft relies on internal APIs from sun.tools.jar
(which is in the jdk.jartool module) at runtime.

This breaks on OpenJDK 9 toolchains because the private
APIs are encapsulated.

This CL allows vm-tests-ft access to these internal APIs
by overriding the module's exports to code from unnamed
modules (in this case, vm-tests-ft) via:

   --add-exports jdk.jartool/sun.tools.jar=ALL-UNNAMED

Test: make ANDROID_COMPILE_WITH_JACK=false checkbuild tests \
      && make checkbuild tests
      (with OpenJDK 8u45 toolchain on the PATH)
Test: make EXPERIMENTAL_USE_OPENJDK9=true \
      ANDROID_COMPILE_WITH_JACK=false checkbuild
      (with jdk 9-ea+170 toolchain on the PATH)

Bug: 38177295

Change-Id: Ia20da2d5bad9ac237d11cb3e9df330af9a18f8c8
1 file changed