aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LibDriver/LibDriver.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-06-29Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI.Peter Collingbourne1-4/+12
The NewArchiveIterator class has a problem: it requires too much context. Any memory buffers added to the archive must be stored within an Archive::Member, which must have an associated Archive. This makes it harder than necessary to create new archive members (or new archives entirely) from scratch using memory buffers. This patch replaces NewArchiveIterator with a NewArchiveMember class that stores just the memory buffer and the information that goes into the archive member header. Differential Revision: http://reviews.llvm.org/D21721 llvm-svn: 274183
2016-04-13LibDriver: Silently do nothing when provided no inputs.Peter Collingbourne1-2/+2
This behavior is strange, but it matches lib.exe. Based on a patch by Nico Weber. Fixes PR27335. llvm-svn: 266236
2015-10-21[Option] Use an ArrayRef to store the Option Infos in OptTable. NFCCraig Topper1-1/+1
llvm-svn: 250901
2015-08-13There is only one saver of strings.Rafael Espindola1-1/+1
llvm-svn: 244854
2015-08-06LibDriver: Replace references to lld-link2 with lld-link.Peter Collingbourne1-1/+1
llvm-svn: 244246
2015-07-17Add support for producing thin archives in llvm-lib.Rafael Espindola1-1/+1
I will send an entry in docs/CommandGuide for review today. llvm-svn: 242533
2015-07-15For new archive member we only need to store the full path.Rafael Espindola1-2/+1
We were storing both the path and the file name, which was redundant and easy to get confused up with. llvm-svn: 242347
2015-07-15Initial support for writing thin archives.Rafael Espindola1-1/+1
llvm-svn: 242269
2015-07-13Add support deterministic output in llvm-ar and make it the default.Rafael Espindola1-1/+2
llvm-svn: 242061
2015-07-08Start adding support for writing archives in BSD format.Rafael Espindola1-2/+4
No support for the symbol table yet (but will hopefully add it today). We always use the long filename format so that we can align the member, which is an advantage of the BSD format. llvm-svn: 241721
2015-07-08LibDriver: Fix output path inference.Peter Collingbourne1-11/+7
The inferred output file name is based on the first input file, not the first one with extension .obj. The output file was also being written to the wrong directory; it needs to be written to whichever directory on the libpath it was found in. This change fixes both issues. llvm-svn: 241710
2015-06-23Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko1-1/+1
Apparently, the style needs to be agreed upon first. llvm-svn: 240390
2015-06-22Modify ParseArgs to return the InputArgList by value - there's no need for ↵David Blaikie1-10/+10
dynamic allocation/ownership here The one caller that does anything other than keep this variable on the stack is the single use of DerivedArgList in Clang, which is a bit more interesting but can probably be cleaned up/simplified a bit further (have DerivedArgList take ownership of the InputArgList rather than needing to reference its Args indirectly) which I'll try to after this. llvm-svn: 240345
2015-06-21ArrayRef-ify libDriverMainDavid Blaikie1-8/+7
llvm-svn: 240234
2015-06-21ArrayRef-ify ParseArgsDavid Blaikie1-2/+2
llvm-svn: 240233
2015-06-20LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.Peter Collingbourne1-2/+45
llvm-svn: 240203
2015-06-19Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko1-1/+1
The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
2015-06-13Bring in a BumpPtrStringSaver from lld and simplify the interface.Rafael Espindola1-22/+3
StringSaver now always saves to a BumpPtrAllocator. The only reason for having the virtual saveImpl is so lld can have a thread safe version. The reason for the distinct BumpPtrStringSaver class is to avoid the virtual destructor. llvm-svn: 239669
2015-06-09LibDriver, llvm-lib: introduce.Peter Collingbourne1-0/+133
llvm-lib is intended to be a lib.exe compatible utility that also understands bitcode. The implementation lives in a library so that lld can use it to implement /lib. Differential Revision: http://reviews.llvm.org/D10297 llvm-svn: 239434