[m-rev.] for review [juliensf]: Avoid command line buffer limits

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Oct 7 02:51:02 AEDT 2008



On Mon, 6 Oct 2008, Peter Ross wrote:

> Estimated hours taken: 4
> Branches: main
>
> Windows has a command line length limit, and I have started to hit
> it when using a MinGW version of the compiler, so use files to
> pass argument lists which are potentially very long to programs.
>
>
> compiler/compile_target_code.m:
> 	Make all calls to mkinit use -f to pass the list
> 	of files to process.
> 	For linking use the @file syntax to pass all the
> 	arguments to a command as when linking we
> 	can have very long lists of object files.


Shouldn't you be checking that the linker actually accepts the @file
syntax, e.g. in the configure script.  GNU ld does, but I'm not sure
that the MacOS X one does -- I had a quick look at the man page but
couldn't see anything about it.  You have an XXX regarding this
above support_at_file - hardcoding it as `yes' is probably going
to break some systems.

> compiler/handle_options.m:
> 	Describe how mmc handles @files.
>
> compiler/mercury_compile.m:
> 	Handle @file arguments on the command line.

I would have though that mmc's --flags-file option was sufficient
for this.  For mmc, @files don't seem to provide anything we don't
already have.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list