This is the mail archive of the java-patches@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]

[ecj] Patch: FYI: speed up build


I'm checking this in on the gcj-eclipse branch.

This speeds up the build by building the whole class library at once.
I may back this out before merging the branch to the trunk, but in the
meantime it makes the build much, much faster.  (The possible problem
with this is that it uses more memory.  I didn't measure how much.)

Tom

Index: ChangeLog.gcj
from  Tom Tromey  <tromey@redhat.com>

	* lib/Makefile.in: Rebuilt.
	* lib/Makefile.am (JAVAC): Define when FOUND_GCJ is true.
	(compile-classes): Remove special case for gcj.

Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am	(revision 114871)
+++ lib/Makefile.am	(working copy)
@@ -18,7 +18,7 @@
 if FOUND_GCJ
 ## This should never be used when gcj is the compiler.
 ## See the compile-classes target.
-JAVAC = exit 1
+JAVAC = $(GCJ) -C -bootclasspath '' --classpath $(compile_classpath) -d . @classes
 else
 if FOUND_JIKES
 JAVAC = $(JIKES) $(JIKESWARNINGS) +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
@@ -150,22 +150,22 @@
 
 $(JAVA_DEPEND): genclasses
 
-if FOUND_GCJ
-## When building with gcj, we do a recursive make.  We split this rule
-## out specially, rather than simply defining JAVAC, so that GNU make
-## will see the recursive make invocation and still allow parallel
-## builds.
+# if FOUND_GCJ
+# ## When building with gcj, we do a recursive make.  We split this rule
+# ## out specially, rather than simply defining JAVAC, so that GNU make
+# ## will see the recursive make invocation and still allow parallel
+# ## builds.
+# compile-classes: classes $(JAVA_SRCS) Makefile
+# 	$(MAKE) -f $(srcdir)/Makefile.gcj \
+# 	  GCJ='$(GCJ)' \
+# 	  compile_classpath='$(top_builddir):$(compile_classpath)' \
+# 	  top_srcdir=$(top_srcdir)
+# 	touch compile-classes
+# else
 compile-classes: classes $(JAVA_SRCS) Makefile
-	$(MAKE) -f $(srcdir)/Makefile.gcj \
-	  GCJ='$(GCJ)' \
-	  compile_classpath='$(top_builddir):$(compile_classpath)' \
-	  top_srcdir=$(top_srcdir)
-	touch compile-classes
-else
-compile-classes: classes $(JAVA_SRCS) Makefile
 	$(JAVAC)
 	touch compile-classes
-endif
+# endif
 
 EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
 CLEANFILES = compile-classes resources classes \


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