[PATCH] Driver: add support for linker file lists

Saleem Abdulrasool abdulras at fb.com
Wed Jun 11 14:40:53 PDT 2014


Hi rui314,

Add support for linker file lists.  A file list is similar to linker response
files, but slightly more restricted.  A file list may only contain a list of
input files.  Flags must remain on the actual command invocation.  Runs of files
are collapsed into a single input which is marked as a file list by prepending
the filename with an '@' symbol.  The linker will read this file and expand the
contents as the input items.

This is supported by at least the GNU linker as well as Microsoft's link.exe
linker.  The use of the option is controlled through a driver flag, defaulting
to disabled.

This functionality aids in reducing the length of the subcommand invoked to
perform the final link.  Some systems have a limit on the command line, and when
linking a large number of object files, it is possible to overrun that limit.

http://reviews.llvm.org/D4104

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  include/clang/Driver/Options.td
  lib/Driver/Tools.cpp
  test/Driver/Inputs/filelist/a.o
  test/Driver/Inputs/filelist/a.obj
  test/Driver/Inputs/filelist/b.o
  test/Driver/Inputs/filelist/c.a
  test/Driver/filelist.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4104.10334.patch
Type: text/x-patch
Size: 11673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140611/f57b0d03/attachment.bin>


More information about the cfe-commits mailing list