diff options
author | 2017-05-19 05:53:42 +0200 | |
---|---|---|
committer | 2017-05-19 15:08:14 +0200 | |
commit | 113ffef65ac73eb530e095282d5d8c909f26100f (patch) | |
tree | aa4aca5902cc46833d502dbd784c1349280b190a /src/main/java/com | |
parent | c5e55bdc34ecc19681fecf116ef1fe57fe977b1e (diff) |
Don't join javabuilder classpath flags
This avoids some string unnecessary string operations,
and keeps command lines below the per-arg limit.
PiperOrigin-RevId: 156514047
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java | 14 |
1 files changed, 5 insertions, 9 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 81214ebce9..cd90dd74fb 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 @@ -657,8 +657,6 @@ public final class JavaCompileAction extends SpawnAction { checkNotNull(classDirectory, "classDirectory should not be null"); checkNotNull(tempDirectory, "tempDirectory should not be null"); - final String pathSeparator = configuration.getHostPathSeparator(); - CustomCommandLine.Builder result = CustomCommandLine.builder(); result.add("--classdir").addPath(classDirectory); @@ -682,17 +680,16 @@ public final class JavaCompileAction extends SpawnAction { result.addExecPath("--output_deps_proto", outputDepsProto); } if (!extdirInputs.isEmpty()) { - result.addJoinExecPaths("--extdir", pathSeparator, extdirInputs); + result.addExecPaths("--extclasspath", extdirInputs); } if (!bootclasspathEntries.isEmpty()) { - result.addJoinExecPaths( - "--bootclasspath", pathSeparator, bootclasspathEntries); + result.addExecPaths("--bootclasspath", bootclasspathEntries); } if (!sourcePathEntries.isEmpty()) { - result.addJoinExecPaths("--sourcepath", pathSeparator, sourcePathEntries); + result.addExecPaths("--sourcepath", sourcePathEntries); } if (!processorPath.isEmpty()) { - result.addJoinExecPaths("--processorpath", pathSeparator, processorPath); + result.addExecPaths("--processorpath", processorPath); } if (!processorNames.isEmpty()) { result.add("--processors", processorNames); @@ -729,8 +726,7 @@ public final class JavaCompileAction extends SpawnAction { } if (!classpathEntries.isEmpty()) { - result.addJoinExecPaths( - "--classpath", pathSeparator, classpathEntries); + result.addExecPaths("--classpath", classpathEntries); } // strict_java_deps controls whether the mapping from jars to targets is |