Skip to content

Commit

Permalink
Avoid CreateProcess error=206 on Windows
Browse files Browse the repository at this point in the history
Make sure command lines involving many files get placed in a temp file
to avoid overflowing the command buffer
  • Loading branch information
garricko committed Jun 25, 2015
1 parent 5f29fe6 commit 8bdc63d
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -101,8 +101,9 @@ public boolean execute() throws BuildException {
cmd.createArgument().setPath(classpath);
cmd.createArgument().setValue(ErrorProneCompiler.class.getName());
setupModernJavacCommandlineSwitches(cmd);
int firstFile = cmd.size();
logAndAddFilesToCompile(cmd);
return executeExternalCompile(cmd.getCommandline(), cmd.size(), true) == 0;
return executeExternalCompile(cmd.getCommandline(), firstFile, true) == 0;
} else {
attributes.log("You must set fork=\"yes\" to use the external error-prone compiler",
Project.MSG_ERR);
Expand Down

0 comments on commit 8bdc63d

Please sign in to comment.