This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: options for compiling large jars
Andrew Haley wrote:
> Per Bothner writes:
> > What are the recommended options for compiling large jars?
> > From what I can tell of Red Har's aot-compile script it
> > appears to compile a .jar file without optimization.
>
> I don't think so; that would be a bug.
The options aot-compile passes to the compiler by default are
"-fPIC -findirect-dispatch -fjni". If you want optimization
you need to invoke aot-compile with -c "-O2" or something.
(FWIW aot-compile-rpm passes the contents of $RPM_OPT_FLAGS
which contains -O2 as well as all kinds of arch-specific
optimizations.)
Cheers,
Gary