summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2015-10-27 16:37:49 +0000
committerEd Schouten <ed@nuxi.nl>2015-10-27 16:37:49 +0000
commitbaff6b46783969622fe484729dc8501316516519 (patch)
tree6e85706c1651671f7f9538dcfc74e5e61ae8e58e /llvm/tools/llvm-ar/llvm-ar.cpp
parentab8363e1566c7c04c36079d660606880ce4135c6 (diff)
downloadbcm5719-llvm-baff6b46783969622fe484729dc8501316516519.tar.gz
bcm5719-llvm-baff6b46783969622fe484729dc8501316516519.zip
Prefer ranlib mode over ar mode.
For CloudABI's toolchain I have a symlink that goes from <target>-ar and <target>-ranlib to LLVM's ar binary, to mimick GNU Binutils' naming scheme. The problem is that if we're targetting ARM64, the name of the ranlib executable is aarch64-unknown-cloudabi-ranlib. This already contains the string "ar". Let's move the "ranlib" test above the "ar" test. It's not that likely that we're going to see operating systems or harwdare architectures that are called "ranlib". Reviewed by: rafael Differential Revision: http://reviews.llvm.org/D14123 llvm-svn: 251413
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index ec3cfcb5cad..c8ff53b58b2 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -797,9 +797,9 @@ int main(int argc, char **argv) {
" This program archives bitcode files into single libraries\n"
);
- if (Stem.find("ar") != StringRef::npos)
- return ar_main();
if (Stem.find("ranlib") != StringRef::npos)
return ranlib_main();
+ if (Stem.find("ar") != StringRef::npos)
+ return ar_main();
fail("Not ranlib, ar or lib!");
}
OpenPOWER on IntegriCloud