guchenbo / simple-build-tool

Automatically exported from code.google.com/p/simple-build-tool
Other
0 stars 0 forks source link

-J options are passed to javac incorrectly #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem (please be specific)?
Define -J option in javaCompileOptions like following:
override def javaCompileOptions = javaCompileOptions("-J-Xmx512M")
That's for really large codebases.

What is the expected behavior? What do you see instead?
Under the hood sbt writes those args to argfile which then gets passed to javac 
via @ notation, but javac man page 
http://download.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javac.html says 
that:
To shorten or simplify the javac command line, you can specify one or more 
files that themselves contain arguments to the javac command (except -J 
options).
and
The -J options are not supported because they are passed to the launcher, which 
does not support argument files.
So expected behavior is to treat -J options separately and pass them out of arg 
file.

What versions of the following are you using?

Java:
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
Scala:
Scala code runner version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL
sbt: 0.7.4
Operating system: FreeBSD 8.1

Original issue reported on code.google.com by siasiam...@gmail.com on 19 Oct 2010 at 10:53

GoogleCodeExporter commented 9 years ago
Thanks a lot for the patch.  It will make it into 0.7.5.

-Mark

Original comment by dmhar...@gmail.com on 21 Oct 2010 at 1:18