This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reduce libgcj building time


>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:

Andreas> on my darwin box it takes a few (around 4) hours to build
Andreas> libgcj.

Ouch.

Andreas> When trying to debug/fix/implement a partial problem it would
Andreas> be helpful to reduce building time.

I keep a full build tree around at all times.  Rebuilds are usually
quicker, though still not so fast as I would like.

Andreas> For example I don't need awt, swing, javax, probably also net.

Andreas> For awt I saw a switch in configure '--enable-java-awt'. Am I
Andreas> correct that disable exists when an enable exists?

Yes, but this switch doesn't do what you think it does.  It controls
which peers are built, not whether the platform-independent java.awt
code is built.  All the Java code is compiled unconditionally.
Likewise, --disable-java-net only disables the native code, not the
Java code.

If you want to go this route, you could try hacking the Makefile to
remove the code you don't need.  However, that might not be as simple
as you'd like, since Java's class libraries are fairly interdependent.

I think you could remove AWT, applet, and Swing fairly easily.
Removing java.net might be quite hard, since our bootstrap loader is a
URLClassLoader and since Class refers to java.net in other ways.

Andreas> Are there other possibilities to reduce the building time?

There are several that have been discussed on the list but never
implemented.

You could build all the .class files with a single invocation of gcj.
That would probably speed up that step quite a bit.  (There are
probably gcj bugs you'd trigger doing this.  Classpath has some
workarounds for these; we could do something similar.)

We've also talked about building libgcj (to native) a package at a
time.  This would probably speed up compilation in some situations.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]