Patch: allow specifiying flags to the VM used in javac script
mark at klomp.org
Thu Jan 8 06:05:53 PST 2009
On Thu, 2009-01-08 at 14:41 +0100, Robert Schuster wrote:
> Robert Schuster schrieb:
> > you may laugh but this is the most simple patch to make cross-compiling
> > OpenJDK easier. The reason is that I run ecj with jamvm/cacao which have
> > a far to small default maximum heap size to comple hotspot-tools.
> > With this patch I can ' JAVA_FLAGS="-Xmx4096M" configure ' and
> > everything is fine. :)
> > 2009-01-07 Robert Schuster <robertschuster at fsfe.org>
> > * javac.in: Added variable @JAVA_FLAGS@ .
> > * configure.ac: Added AC_SUBST for JAVA_FLAGS.
Wouldn't it be better to make sure there is always enough memory for the
compiler? I think just adding -Xmx4096M directly to javac.in might be
easier than have people try, fail because their java has a too low
default and having to reconfigure. Or do you need something this for
other stuff also?
Martin does have a point, it would be good if the javac.in script did
understand -J. That is kind of why we have javac.in as wrapper, so you
can translate unknown options to something know for the detected
compiler. Then you could push the exact memory needed up into the actual
javac invocation. Assuming that there are not too many places that need
to expand the default memory settings of course. Otherwise setting it
default to something large enough for everything seems better.
More information about the distro-pkg-dev