support -J options when forking (#124)

This commit is contained in:
Artyom Olshevskiy 2010-10-21 09:12:00 -04:00 committed by Mark Harrah
parent c87fae4465
commit 3c5d8ab29b
1 changed files with 3 additions and 2 deletions

View File

@ -45,8 +45,9 @@ object JavaCompiler
/** `doFork` should be a function that forks javac with the provided arguments and sends output to the given Logger.*/
def forkJavac(implicit doFork: Fork) = (arguments: Seq[String], log: Logger) =>
{
def externalJavac(argFile: File) = doFork(("@" + normalizeSlash(argFile.getAbsolutePath)) :: Nil, log)
withArgumentFile(arguments)(externalJavac)
val (jArgs, nonJArgs) = arguments.partition(_.startsWith("-J"))
def externalJavac(argFile: File) = doFork(jArgs :+ ("@" + normalizeSlash(argFile.getAbsolutePath)), log)
withArgumentFile(nonJArgs)(externalJavac)
}
val directJavac = (arguments: Seq[String], log: Logger) =>
{