| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(cherry picked from commit f00ab188f4e4214dfbecfdd8968a183e9363cefa)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If llvm-ar is installed at arm-pokymllib32-linux-gnueabi-llvm-ar, it may
think it is llvm-lib due to the "lib" substring.
Improve the heuristic to make all the following work as intended:
llvm-ar-9 (llvm-9 package on Debian)
llvm-ranlib.exe
Lib.exe (reported by D44808)
arm-pokymllib32-linux-gnueabi-llvm-ar (reported by D71030)
Reviewed By: raj.khem, rupprecht
Differential Revision: https://reviews.llvm.org/D71302
|
|
|
|
|
|
|
|
| |
This diff adds test coverage for thin archives including additions to
existing tests. In some cases I have updated the formats of these tests
to better match other tests in the archive.
Differential Revision: https://reviews.llvm.org/D70969
|
|
|
|
|
|
|
| |
Also, fix a bug in ranlib where it didn't correctly detect being run
without any argument and would try to operate on the empty string.
Differential Revision: https://reviews.llvm.org/D70021
|
|
|
|
|
|
| |
Reviewed By: jhenderson, kongyi
Differential Revision: https://reviews.llvm.org/D69911
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
installed for its last RUN line to work. If not installed, the unicode
string gets encoded (interpreted) as ascii which fails since the most
significant byte is non zero. This commit changes the test to only rely
on the system being able to encode the pound sign in its default
encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file
via input/output redirection. This avoids forcing a given locale to be
present and supported. A Byte Order Mark is also added to help
recognizing the encoding of the file and its endianness. Finally the
XFAIL on system-darwin is removed since the test actually passes fine on
Mac OS X and XFAIL was only added because it failed before.
Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Also update the help modifier (h) so that it works as a modifier and not just as a standalone `h`. For example, `llvm-ar h` prints the help message, but `llvm-ar xh` currently prints `unknown option h`.
Reviewers: MaskRay, gbreynoo
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69007
llvm-svn: 375028
|
|
|
|
|
|
|
|
|
| |
When on windows gnu-ar treats member names as case insensitive. This
commit implements the same behaviour.
Differential Revision: https://reviews.llvm.org/D68033
llvm-svn: 375002
|
|
|
|
|
|
| |
This reverts commit r374318 / b6f1d1fa0e3ee0e25f22414bf97c05276b934507.
llvm-svn: 374349
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
installed for its last RUN line to work. If not installed, the unicode
string gets encoded (interpreted) as ascii which fails since the most
significant byte is non zero. This commit changes the test to only rely
on the system being able to encode the pound sign in its default
encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file
via input/output redirection. This avoids forcing a given locale to be
present and supported. A Byte Order Mark is also added to help
recognizing the encoding of the file and its endianness.
Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68472
llvm-svn: 374318
|
|
|
|
|
|
|
| |
The test is dependant on the installation of the en_US.UTF-8
locale. The reasoning for this is clarified in the amended comment.
llvm-svn: 373737
|
|
|
|
|
|
| |
This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee)
llvm-svn: 373728
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
installed for its last RUN line to work. If not installed, the unicode
string gets encoded (interpreted) as ascii which fails since the most
significant byte is non zero. This commit changes the call to open to
use a binary literal of the UTF-8 encoding for the pound sign instead,
thus bypassing the encoding step.
Note that the echo to create the <pound sign>.txt file will work
regardless of the locale because both the shell and the echo (in case
it's not a builtin of the shell concerned) only care about ascii
character to operate. Indeed, the mri-utf8.test file (and in particular
the pound sign) is encoded in UTF-8 and UTF-8 guarantees only ascii
characters can create bytes that can be interpreted as ascii characters
(i.e. bytes with the most significant bit null).
So the process to break down the filename in the line goes something
along:
- find an ascii chevron '>'
- find beginning of the filename by removing ascii space-like characters
- find ascii newline character indicating the end of the redirection (no
semicolon ';', closing curly bracket '}' or parenthesis ')' or the
like
- create a file whose name is made of all the bytes in between beginning
and end of filename *without interpretting them*
Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68418
llvm-svn: 373700
|
|
|
|
|
|
|
|
|
| |
This test only relies on running on a case insensitive file system,
the exact target triple of the toolchain shouldn't matter.
Differential Revision: https://reviews.llvm.org/D68136
llvm-svn: 373697
|
|
|
|
|
|
|
|
|
|
| |
llvm/test/Object/ contains tests for the ArchiveWriter library, however
support for MRI scripts is found in llvm-ar and not the library. This
diff moves the MRI related tests and removes those that are duplicates.
Differential Revision: https://reviews.llvm.org/D68038
llvm-svn: 372973
|
|
|
|
|
|
|
|
|
|
|
| |
Reapply r372309
Errors that occur when reading an MRI script now include a corresponding
line number.
Differential Revision: https://reviews.llvm.org/D67449
llvm-svn: 372374
|
|
|
|
|
|
|
|
|
| |
As per bug 40244, fixed an error where the error message was repeated.
Differential Revision: https://reviews.llvm.org/D67038
Patch by Yu Jian (wyjw)
llvm-svn: 372370
|
|
|
|
|
|
|
|
| |
Revert r372309 due to buildbot failures
Differential Revision: https://reviews.llvm.org/D67449
llvm-svn: 372311
|
|
|
|
|
|
|
|
|
| |
Errors that occur when reading an MRI script now include a corresponding
line number.
Differential Revision: https://reviews.llvm.org/D67449
llvm-svn: 372309
|
|
|
|
|
|
|
|
|
|
|
| |
Support `llvm-ar h` and `llvm-ar -h` because they may be what users try
at first. Note, operation 'h' is undocumented in GNU ar.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D67560
llvm-svn: 372088
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most GNU binutils don't append full stops in error messages. This
convention has been adopted by a bunch of LLVM binary utilities. Make
llvm-ar follow the convention as well.
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D67558
llvm-svn: 371912
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The internal representation of llvm-ar archives uses linux style slashes
for paths, no matter the OS. In the case of windows this meant file
paths input intending to match existing members would only match if
linux style slashes where used. This change allows either slash
direction to be input by the user.
This change includes removing an unnecessary call to normalisePath and
moving the call of another.
Differential Revision: https://reviews.llvm.org/D65743
llvm-svn: 368573
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In diff D64802 I marked three tests as expected failures for darwin but
James Nagurne saw these fail on his downstream embedded ARM cross
compiler.
I believe XFAIL: system-darwin should be used instead of using XFAIL:
darwin due to the problem being related to the darwin host and not the
target.
Differential Revision: https://reviews.llvm.org/D65745
llvm-svn: 368564
|
|
|
|
|
|
|
| |
This fixes two tests that did not remove existing archives
before testing due to mistyped archive names.
llvm-svn: 366908
|
|
|
|
|
|
|
|
|
|
| |
These tests that failed on Darwin but passed on other machines due to the default archive format differing
on a Darwin machine, and what looks to be bugs in the output of this format.
I can not investigate these issue further so the tests are considered expected failures on Darwin.
Differential Revision: https://reviews.llvm.org/D64802
llvm-svn: 366334
|
|
|
|
|
|
| |
Also simplify some empty output tests with 'count 0'
llvm-svn: 366324
|
|
|
|
|
|
|
|
| |
Some more tests to increase llvm-ar test coverage, this time for replace 'r' and update 'u'.
Differential Revision: https://reviews.llvm.org/D64803
llvm-svn: 366309
|
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing llvm-ar functionality.
print.test is omitted due to failing on Darwin.
Differential Revision: https://reviews.llvm.org/D64330
llvm-svn: 366209
|
|
|
|
|
|
|
|
| |
This reapplies 365316 without extract.test due to failing on Darwin.
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 366206
|
|
|
|
|
|
|
|
| |
This reapplies 363232 without mri-utf8.test due to failing on Darwin.
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 366201
|
|
|
|
|
|
| |
llvm-ar.extract.test has been failing on greendragon and gone unfixed.
llvm-svn: 365383
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing llvm-ar functionality.
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365318
|
|
|
|
|
|
|
|
| |
Reverted due to test failures
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365317
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing llvm-ar functionality.
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365316
|
|
|
|
|
|
|
| |
This reverts commit 250015bacf7f255abcfb646fb8b6b56ce8be7e01.
r365039 was re-commit of D63197 and failed on Mac. Reid XFAIL'd it, but I'd rather jsut revert and have it fixed properly.
llvm-svn: 365084
|
|
|
|
| |
llvm-svn: 365076
|
|
|
|
|
|
|
|
| |
This reapplies 363232 that was reverted due to a buildbot test failure, this build bot has now been fixed.
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 365039
|
|
|
|
|
|
|
|
|
| |
This is partial revert of 70a8027c60fe1f95e8a8a1ff6575ebf8778d3544.
The test apparently failed on win32 bots due to the way slashes in
pathnames are handled.
llvm-svn: 364705
|
|
|
|
|
|
|
|
| |
Also a test for this.
Differential Revision: https://reviews.llvm.org/D63836
llvm-svn: 364673
|
|
|
|
|
|
|
|
| |
This reverts 363232 due to mru-utf8.test buildbot test failure
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 363239
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing MRI script functionality.
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 363232
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: thin-archive.test assumes the Output/<testname> structure that lit creates. Rewrite the test in a way that still tests the same thing (creating via relative path and adding via absolute path) but doesn't assume this specific lit structure, making it possible to run in a lit emulator.
Reviewers: gbreynoo
Reviewed By: gbreynoo
Subscribers: llvm-commits, bkramer
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62930
llvm-svn: 363189
|
|
|
|
|
|
|
|
| |
This patch implements the "CREATE_THIN" MRI script command, allowing thin archives to be created via MRI scripts.
Differential Revision: https://reviews.llvm.org/D62919
llvm-svn: 362704
|
|
|
|
|
|
|
|
|
|
| |
Includes a fix for an introduced build failure due to a post c++11 use of std::mismatch.
This fixes some thin archive relative path issues, paths are shortened where possible and paths are output correctly when using the display table command.
Differential Revision: https://reviews.llvm.org/D59491
llvm-svn: 362484
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r362407. It broke compilation of
llvm/lib/Object/ArchiveWriter.cpp:
error: type 'llvm::sys::path::const_iterator' does not provide a call
operator
llvm-svn: 362413
|
|
|
|
|
|
|
|
| |
This fixes some thin archive relative path issues, paths are shortened where possible and paths are output correctly when using the display table command.
Differential Revision: https://reviews.llvm.org/D59491
llvm-svn: 362407
|
|
|
|
| |
llvm-svn: 359688
|
|
|
|
| |
llvm-svn: 359383
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parsing/dumping.
Currently, YAML has the following syntax for describing the symbols:
Symbols:
Local:
LocalSymbol1:
...
LocalSymbol2:
...
...
Global:
GlobalSymbol1:
...
Weak:
...
GNUUnique:
I.e. symbols are grouped by their bindings. That is not very convenient,
because:
It does not allow to set a custom binding, what can be useful for producing
broken/special outputs for test cases. Adding a new binding would require to
change a syntax (what we observed when added GNUUnique recently).
It does not allow to change the order of the symbols in .symtab/.dynsym,
i.e. currently all Local symbols are placed first, then Global, Weak and GNUUnique
are following, but we are not able to change the order.
It is not consistent. Binding is just one of the properties of the symbol,
we do not group them by other properties.
It makes the code more complex that it can be. This patch shows it can be simplified
with the change performed.
The patch changes the syntax to just:
Symbols:
Symbol1:
...
Symbol2:
...
...
With that, we are able to work with the binding field just like with any other symbol property.
Differential revision: https://reviews.llvm.org/D60122
llvm-svn: 357595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
GNU ar supports the 'N' count modifier for the extract (x) and delete (d) operations. When an archive contains multiple members with the same name, this can be used to extract (or delete) them individually. For example:
```
$ llvm-ar t archive.a
foo
foo
$ llvm-ar x archive.a
-> Writes foo twice, overwriting it the second time :( :(
$ llvm-ar xN 1 archive.a foo && mv foo foo.1
$ llvm-ar xN 2 archive.a foo && mv foo foo.2
-> Write foo twice, renaming it in between invocations to preserve all versions
```
Reviewers: ruiu, MaskRay
Reviewed By: ruiu, MaskRay
Subscribers: jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59503
llvm-svn: 356466
|