summaryrefslogtreecommitdiff
path: root/tools/llvm-ar
Commit message (Collapse)AuthorAge
...
* Try to open the file before use data from stat.Rafael Espindola2013-07-13
| | | | | | | Looks like on mingw we get bogus last modification times on directories. Should fix the mingw bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186240 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused file. Thanks to Sean Silva for noticing it.Rafael Espindola2013-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186239 91177308-0d34-0410-b5e6-96231b3b80d8
* Add r186216 back, but make the test tolerant of different uids and gids.Rafael Espindola2013-07-13
| | | | | | | original message: Fix a off by one error about which members need to use the string table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186238 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commit r186216 -- it's breaking bots:Chandler Carruth2013-07-13
| | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test Original commit log: Fix a off by one error about which members need to use the string table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186232 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a off by one error about which members need to use the string table.Rafael Espindola2013-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186216 91177308-0d34-0410-b5e6-96231b3b80d8
* fix autoconf buildRafael Espindola2013-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186200 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build with c++03.Rafael Espindola2013-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186198 91177308-0d34-0410-b5e6-96231b3b80d8
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-12
| | | | | | | | | | | | | | | | | | | | | | This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186197 91177308-0d34-0410-b5e6-96231b3b80d8
* Add static.Rafael Espindola2013-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186170 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-ar: Clean up memory management with OwningPtr.Benjamin Kramer2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186131 91177308-0d34-0410-b5e6-96231b3b80d8
* Use %llu to print a 64 bit number. Should fix the ARM bots.Rafael Espindola2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186113 91177308-0d34-0410-b5e6-96231b3b80d8
* InsertBefore is the same as AddBefore. Delete it.Rafael Espindola2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186094 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FIXME about the format and add a test.Rafael Espindola2013-07-11
| | | | | | | While at it, use strftime on Unix too and use the thread safe versions of localtime. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186090 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the 'N' modifier from llvm-ar.Rafael Espindola2013-07-11
| | | | | | | | * It is not present on OS X. * It is untested. * It is not needed for using ar in a build system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186080 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete dead code.Rafael Espindola2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186079 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for truncating names in archives.Rafael Espindola2013-07-11
| | | | | | | | | | * All systems we support have some form of long name support. * The options has different names and semantics in different implementations ('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on build systems. * It was completely untested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186078 91177308-0d34-0410-b5e6-96231b3b80d8
* Sync llvm-ar's help string with the options it supports.Rafael Espindola2013-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186076 91177308-0d34-0410-b5e6-96231b3b80d8
* Create files with the correct permission instead of changing it afterwards.Rafael Espindola2013-07-08
| | | | | | No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185832 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes problem when calling llvm-ar from an unmodifiable directory.Manuel Klimek2013-07-08
| | | | | | | | | This fixes a regression introduced by r185726: the new call to get a unique file does not prepend the system temporary directory, so we need to anchor on the file that the temporary file gets moved to to ensure we're on the same file system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185825 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.Michael Gottesman2013-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185751 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola2013-07-05
| | | | | | | | | | | | | | This function is complementary to createTemporaryFile. It handles the case were the unique file is *not* temporary: we will rename it in the end. Since we will rename it, the file has to be in the same filesystem as the final destination and we don't prepend the system temporary directory. This has a small semantic difference from unique_file: the default mode is 0666. This matches the behavior of most unix tools. For example, with this change lld now produces files with the same permissions as ld. I will add a test of this change when I port clang over to createUniqueFile (next commit). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185726 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't create an archive if, for example, we are asked to print the index.Rafael Espindola2013-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185697 91177308-0d34-0410-b5e6-96231b3b80d8
* Use simpler version of exists.Rafael Espindola2013-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185695 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove NoOperation.Rafael Espindola2013-07-05
| | | | | | | parseCommandLine prints and error and exists if no operation is specified, so it never returns NoOperation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185691 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't treat bitcode files specially in llvm-ar.Rafael Espindola2013-07-05
| | | | | | | We really want bitcode files to behave as regular object files in archives, so we don't need to track that a member is bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185681 91177308-0d34-0410-b5e6-96231b3b80d8
* Use enums instead of raw octal values.Rafael Espindola2013-06-26
| | | | | | Patch by 罗勇刚(Yonggang Luo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184971 91177308-0d34-0410-b5e6-96231b3b80d8
* Create the file with the right permissions instead of setting it afterwards.Rafael Espindola2013-06-22
| | | | | | Removes the last use of PathV1.h in llvm-ar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184630 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some uses of PathV1.h in ArchiveWriter.cpp.Rafael Espindola2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184599 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a fixme.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184486 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184484 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-20
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184464 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a raw_fd_ostream instead of a std::ofstream.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184460 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a trivial use of sys::Path.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184455 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-20
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184450 91177308-0d34-0410-b5e6-96231b3b80d8
* Use only the filename when deciding if a file is a duplicate.Rafael Espindola2013-06-20
| | | | | | Matches gnu ar behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184448 91177308-0d34-0410-b5e6-96231b3b80d8
* Add r184420 back, but also handle long file names.Rafael Espindola2013-06-20
| | | | | | | | | | Original message: Don't include directory names in archives. This matches the behavior of both gnu and os x versions of ar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184423 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Don't include directory names in archives."Rafael Espindola2013-06-20
| | | | | | | This reverts commit 184420. Investigating the bot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184421 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include directory names in archives.Rafael Espindola2013-06-20
| | | | | | This matches the behavior of both gnu and os x versions of ar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184420 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove remaining bits of the old LLVM specific symtab handling.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184418 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more unused functions.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184416 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused methods.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184415 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the simpler sys::fs::exists.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184413 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a use of sys::Path.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184412 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused function.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184359 91177308-0d34-0410-b5e6-96231b3b80d8
* Really fix the missing header :-(Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184355 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing include found by the bots.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184354 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove last use of PathV1.h from Archive.hRafael Espindola2013-06-19
| | | | | | Store the individual fields we need instead of a sys::FileStatus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184353 91177308-0d34-0410-b5e6-96231b3b80d8
* Always set the mode.Rafael Espindola2013-06-19
| | | | | | | This matches GNU ar behavior. Also remove the now unused getFileStatus method. Not sure how to add a test, it would have to run ls -l or something like that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184337 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more uses of sys::Path.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184328 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused function.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184320 91177308-0d34-0410-b5e6-96231b3b80d8