Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow long non-file arguments to be spilled #671

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ public boolean execute() throws BuildException {
}

cmd.createArgument().setValue(ErrorProneCompiler.class.getName());
// This is the first argument that may be spilled to a file.
// The ant API describes it as the first argument which is a
// file, but in fact only uses it for spilling. Putting the
// break here allows long classpath arguments to be handled.
int firstSpillableArgument = cmd.size();
setupModernJavacCommandlineSwitches(cmd);
int firstFile = cmd.size();
logAndAddFilesToCompile(cmd);
return executeExternalCompile(cmd.getCommandline(), firstFile, true) == 0;
return executeExternalCompile(cmd.getCommandline(), firstSpillableArgument, true) == 0;
} else {
attributes.log(
"You must set fork=\"yes\" to use the external Error Prone compiler", Project.MSG_ERR);
Expand Down