summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-ranlib
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-ranlib] Update expected error message check for WindowsAlex Richardson2020-01-021-4/+4
| | | | | | | On Windows hosts, the error message will be something like `c:\src\llvm-project\out\gn\bin\llvm-ranlib.exe: error: Invalid option: '--D'`. Due to the .exe after llvm-ranlib the existing CHECK lines do not match. Fix this by ignoring the program name and starting the check line at "error:".
* [llvm-ranlib] Relax D-flag.test to allow it to pass on Windows hostsAlex Richardson2020-01-021-3/+2
| | | | | | It appears that Windows hosts always report rwxrwxrwx even with the chmod 644 invocation. As this test only cares about the timestamps and not the permissions, use a regex wildcard instead.
* Make the llvm-ranlib/help-message.test test pass in unusual configurationsDmitri Gribenko2020-01-021-1/+1
| | | | | | The version string can be customized by CMake options, so the 'LLVM version' substring is not guaranteed to appear (see VersionPrinter::print in llvm/lib/Support/CommandLine.cpp).
* Fix D-flag.test by running chmod before creating the archiveAlex Richardson2020-01-021-0/+1
| | | | | | Not all systems create the .o file with mode 644 by default. Adding an explicit chmod invocation should fix this test added in 535b3c6b2f1c81ed91942ebd9ea06a1022dc59a1
* [llvm-ranlib] Handle -D and -U command line flagAlex Richardson2020-01-022-4/+58
| | | | | | | | | | | | | | I have been trying to build CheriBSD (a fork for FreeBSD for the CHERI CPU) with LLVM binutils instead of the default elftoolchain utilities. I noticed that building static archives was failing because ranlib is invoked with the -D flag. This failed with llvm-ranlib since it parses the -D flag as the archive path and reports an error that more than one archive has been passed. This fixes https://llvm.org/PR41707 Reviewed By: rupprecht Differential Revision: https://reviews.llvm.org/D71554
* [llvm-ar] Improve tool selection heuristicFangrui Song2019-12-101-0/+13
| | | | | | | | | | | | | | | | 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
* llvm-ranlib/nm: Don't print usage message except for usage errorsSam Clegg2019-11-082-0/+15
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
OpenPOWER on IntegriCloud