Re: Command line too long

Xavier Leroy (xleroy@pauillac.inria.fr)
Fri, 8 Mar 1996 10:22:23 +0100 (MET)

From: Xavier Leroy <xleroy@pauillac.inria.fr>
Message-Id: <199603080922.KAA09361@pauillac.inria.fr>
Subject: Re: Command line too long
To: kgallo@microsoft.com (Kevin Gallo)
Date: Fri, 8 Mar 1996 10:22:23 +0100 (MET)
In-Reply-To: <c=US%a=_%p=msft%l=RED-81-MSG-960306002941Z-7477@red-05-imc.itg.microsoft.com> from "Kevin Gallo" at Mar 5, 96 04:29:41 pm

> I am using CSL 1.12 (the native code compiler) and I have the problem
> that my command line gets too long for my shell to handle. I see no
> solution to the problem other than trying to shorten the command line
> but this undesirable. Is there a way to partially link several modules
> to do the compile in stages?

You can use libraries as intermediate steps:

cslopt -a -o templib1.cmxa <many .cmx files>
cslopt -a -o templib2.cmxa <more .cmx files>
cslopt -o myexec templib1.cmxa templib2.cmxa <remaining .cmx files>

This takes a little longer to link because of the extra I/O involved
with building the libraries, but it should work.

> Also it would be nice if CSL could support
> response files (files with the command line parameters) to allow for
> unlimited argument lengths.

Modern Unix systems set the ARG_MAX limit so high (128 kbytes under
Linux, 40 kbytes under OSF1) that I was hoping this would not be necessary.

Best regards,

- Xavier Leroy