Skip to content

Commit

Permalink
Merge "Add property to enable adding tools.jar to bootclasspath."
Browse files Browse the repository at this point in the history
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Feb 6, 2018
2 parents fa54e75 + 5f8cb42 commit 9775435
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions java/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9775435

Please sign in to comment.