diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java index a436124a72..d5f346ab15 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java @@ -94,6 +94,9 @@ public class JavaCompileAction extends AbstractAction { */ private final NestedSet<Artifact> classpathEntries; + /** The list of bootclasspath entries to specify to javac. */ + private final ImmutableList<Artifact> bootclasspathEntries; + /** * The path to the extdir to specify to javac. */ @@ -177,6 +180,7 @@ public class JavaCompileAction extends AbstractAction { PathFragment classDirectory, Artifact outputJar, NestedSet<Artifact> classpathEntries, + ImmutableList<Artifact> bootclasspathEntries, Collection<Artifact> extdirInputs, List<Artifact> processorPath, List<String> processorNames, @@ -211,6 +215,7 @@ public class JavaCompileAction extends AbstractAction { this.classDirectory = Preconditions.checkNotNull(classDirectory); this.outputJar = outputJar; this.classpathEntries = classpathEntries; + this.bootclasspathEntries = ImmutableList.copyOf(bootclasspathEntries); this.extdirInputs = extdirInputs; this.processorPath = ImmutableList.copyOf(processorPath); this.processorNames = ImmutableList.copyOf(processorNames); @@ -250,6 +255,12 @@ public class JavaCompileAction extends AbstractAction { return classpathEntries; } + /** Returns the list of paths that represents the bootclasspath. */ + @VisibleForTesting + public Collection<Artifact> getBootclasspath() { + return bootclasspathEntries; + } + /** * Returns the path to the extdir. */ @@ -436,6 +447,7 @@ public class JavaCompileAction extends AbstractAction { JavaCompileInfo.Builder info = JavaCompileInfo.newBuilder(); info.addAllSourceFile(Artifact.toExecPaths(getSourceFiles())); info.addAllClasspath(Artifact.toExecPaths(getClasspath())); + info.addAllBootclasspath(Artifact.toExecPaths(getBootclasspath())); info.addClasspath(getClassDirectory().getPathString()); info.addAllSourcepath(Artifact.toExecPaths(getSourceJars())); info.addAllJavacOpt(getJavacOpts()); @@ -927,6 +939,7 @@ public class JavaCompileAction extends AbstractAction { classDirectory, outputJar, classpathEntries, + bootclasspathEntries, extdirInputs, processorPath, processorNames, |