diff options
author | Fangrui Song <maskray@google.com> | 2019-12-10 13:45:02 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-12-10 17:32:50 -0800 |
commit | 4d53b99c5df2c83172d23521d1b1ab8361d6de92 (patch) | |
tree | d848c045cd9aeac3e8e9bf7ff874415c8bcf9635 /llvm/test/tools/llvm-ar | |
parent | 935d41e4bd6347155af10e50f8b24e86a5d626f7 (diff) | |
download | bcm5719-llvm-4d53b99c5df2c83172d23521d1b1ab8361d6de92.tar.gz bcm5719-llvm-4d53b99c5df2c83172d23521d1b1ab8361d6de92.zip |
[llvm-ar] Improve tool selection heuristic
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
Diffstat (limited to 'llvm/test/tools/llvm-ar')
-rw-r--r-- | llvm/test/tools/llvm-ar/tool-name.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-ar/tool-name.test b/llvm/test/tools/llvm-ar/tool-name.test new file mode 100644 index 00000000000..cb656d3b47f --- /dev/null +++ b/llvm/test/tools/llvm-ar/tool-name.test @@ -0,0 +1,15 @@ +## Don't make symlinks on Windows. +# UNSUPPORTED: system-windows + +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: ln -s llvm-ar %t/llvm-ar-9 +# RUN: ln -s llvm-ar %t/ar.exe +# RUN: ln -s llvm-ar %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 + +# RUN: llvm-ar h | FileCheck %s +# RUN: %t/llvm-ar-9 h | FileCheck %s +# RUN: %t/ar.exe h | FileCheck %s +# RUN: %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 h | FileCheck %s + +# CHECK: USAGE: llvm-ar |