diff options
| author | 2018-02-06 10:34:32 -0800 | |
|---|---|---|
| committer | 2018-02-06 11:01:51 -0800 | |
| commit | 5f8cb424aa7e519d063e33007b0977dc0d4a8fd0 (patch) | |
| tree | 6f22b303e361dfc509005dd0b69a4f671c0f69e4 | |
| parent | 035f779fbe1bdebe4dd7591b37ac1ac367b5d5d4 (diff) | |
Add property to enable adding tools.jar to bootclasspath.
Converting Doclava to Soong need tools.jar as one of its bootclasspaths.
Test: m doclava
Bug: b/70351683
Change-Id: I0ac65fcbe1eadfc57239cde2e83b80cf441a9b69
| -rw-r--r-- | java/java.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index a6769e759..b2fbc429a 100644 --- a/java/java.go +++ b/java/java.go @@ -116,6 +116,9 @@ type CompilerProperties struct { // The number of Java source entries each Javac instance can process Javac_shard_size *int64 + // Add host jdk tools.jar to bootclasspath + Use_tools_jar *bool + Openjdk9 struct { // List of source files that should only be used when passing -source 1.9 Srcs []string @@ -694,6 +697,10 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB flags.bootClasspath = append(flags.bootClasspath, android.PathForSource(ctx, java8Home, "jre/lib/jce.jar"), android.PathForSource(ctx, java8Home, "jre/lib/rt.jar")) + if Bool(j.properties.Use_tools_jar) { + flags.bootClasspath = append(flags.bootClasspath, + android.PathForSource(ctx, java8Home, "lib/tools.jar")) + } } // systemModules |