This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: gcj problem compiling 850 files
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: "Lars Andersen" <lars at rimfaxe dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: Fri, 24 Jan 2003 12:08:40 +0100
- Subject: RE: gcj problem compiling 850 files
>>>> I have experienced problems with many input files as well, concerning
>>>> the mingw port. In the linux port there seems to be no limit to the
>>>> number of input classes, or at least I haven't bumped into it yet.
>>>> Windows is a completely different matter it seems. I solve it by
>>>> compiling in bites to .o object files, and then linking it all.
I've run into the same problem. The lpCommandLine string in the win32
CreateProcess() function is limited to 32Kb. When the string gets larger
than the limit, the process creation fails.
I solve this by creating archives of the *.o files (for example, per
namespace) with ar; and link the resulting *.a files:
<target name="archive">
<apply failonerror="true" executable="ar" parallel="true">
<fileset dir="obj/namespace1" includes="**/*.o"/>
<arg line="-cr arc/namespace1.a"/>
</apply>
<apply failonerror="true" executable="ar" parallel="true">
<fileset dir="obj/namespace2" includes="**/*.o"/>
<arg line="-cr arc/namespace2.a"/>
</apply>
</target>
<target name="link">
<apply failonerror="true" executable="gcj" parallel="true">
<fileset dir="arc/" includes="*.a"/>
<arg value="--main=myMain"/>
<arg line="-o exe/myexe"/>
<srcfile/>
</apply>
</target>