9 messages in com.perforce.jamming[jamming] link.exe input line too long
FromSent OnAttachments
Jacob Gorm Hansen21 Nov 2002 05:22 
Roger Lipscombe21 Nov 2002 05:53 
Ingo Weinhold21 Nov 2002 06:03 
BROSSIER Florent21 Nov 2002 06:44 
Jacob Gorm Hansen21 Nov 2002 07:14 
Jacob Gorm Hansen21 Nov 2002 07:57 
Matt Armstrong24 Nov 2002 08:36 
Jan Mikkelsen24 Nov 2002 12:21 
davi...@rcn.com24 Nov 2002 13:05 
Subject:[jamming] link.exe input line too long
From:Matt Armstrong (ma@lickey.com)
Date:11/24/2002 08:36:53 AM
List:com.perforce.jamming

Jacob Gorm Hansen <jg@ioi.dk> writes:

On Thu, 2002-11-21 at 16:14, Jacob Gorm Hansen wrote:

On Thu, 2002-11-21 at 15:03, Ingo Weinhold wrote:

An easier way would be to use an intermediate static library (Library rule). The Archive actions use the piecemeal modifier.

Cool. I just had to recompile Jam.exe back to a MAXLINE of 996.

Link.exe sucks. Jam.exe rules ;-)

OK not that cool anyway. Now my top-level link which cannot be made piecemeal is too large to fit in the new 996 char limit.

So, I modified cmd_new to check for 996 when the rule allows piecemeal, and for MAXLINE (which is 10240) otherwise:

New version:

/* Bail if the result won't fit in MAXLINE */ /* We don't free targets/sources/shell if bailing. */

if( var_string( rule->actions, cmd->buf, (rule->flags & RULE_PIECEMEAL)? 996 : MAXLINE, &cmd->args ) < 0 ) { cmd_free( cmd ); return 0; }

I suggest this as a change to future releases, as it gives you the best of both worlds.

Not really, as 10240 is too big even under Win2k if the actions has more than one line. I've found CMD.EXE randomly crashing if any given line in the actions line is > 1-2k, even though NT itself can handle individual command line lengths of 10240 bytes.

I've been thinking about an extension to the actions syntax to allow for the automatic creation of response files. E.g.

actions Cc { $(CC) @{ -c -o $(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) $(>) } }

would put everything within the @{ } into a response file automatically. Jam takes care of naming, creating and deleting the response file, so the Jam rules themselves can remain simple and straightforward.