diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java | 13 | ||||
-rw-r--r-- | src/main/protobuf/extra_actions_base.proto | 1 |
2 files changed, 14 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, diff --git a/src/main/protobuf/extra_actions_base.proto b/src/main/protobuf/extra_actions_base.proto index decab60e3f..208e5394cd 100644 --- a/src/main/protobuf/extra_actions_base.proto +++ b/src/main/protobuf/extra_actions_base.proto @@ -126,6 +126,7 @@ message JavaCompileInfo { repeated string javac_opt = 5; repeated string processor = 6; repeated string processorpath = 7; + repeated string bootclasspath = 8; } // Provides access to data that is specific to python rules. |