[LLVMdev] RFC: Adding an option to llvm-link to allow it to get a list of input bitcode file names from a file
Liu, Yaxun (Sam)
Yaxun.Liu at amd.com
Thu Sep 13 12:05:37 PDT 2012
It seems clang supports @file.
http://llvm.org/svn/llvm-project/cfe/trunk/tools/driver/driver.cpp
So maybe it is a better idea to let llvm-link support @file instead of adding a new option.
Sam
-----Original Message-----
From: Nick Lewycky [mailto:nicholas at mxc.ca]
Sent: Thursday, September 13, 2012 2:33 PM
To: Liu, Yaxun (Sam)
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] RFC: Adding an option to llvm-link to allow it to get a list of input bitcode file names from a file
Liu, Yaxun (Sam) wrote:
> I am proposing to add an option to llvm-link allow it to get a list of
> input bitcode file names from a file.
>
> The reason is that there is a limitation for command line length which
> limits the number of input bitcode files that can be passed to
> llvm-link. By adding this option we can bypass such limitation.
>
> The name of the option can be discussed. My initial proposal would be
> -input-file-list.
It's common for tools to accept "@file" as an argument that means "read options from file", where options may include both flags and positional arguments (ie., more input files). For instance, gcc, as and ld all support @file.
I realize this is more complicated than just reading in a list of input bitcode files, but I think the right fix is to teach llvm to support this. (It looks like clang already does? What are they doing?)
Nick
> Each line of the list file is a path to an input bitcode file.
>
> If this option is given, no input bitcode file names are allowed in
> the command line. If input bitcode file names are given in the command
> line, this option is not allowed.
>
> The implementation is simple. Only llvm-link.cpp is affected.
>
> Thanks.
>
> Sam Liu
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list