[PATCH] D71848: Allow the discovery of Android NDK's triple-prefixed binaries.

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 14:38:20 PST 2020


jyknight added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:4696
+  llvm::Triple ToolchainTriple = TC.getTriple();
+  if (ToolchainTriple.isAndroid()) {
+    std::string ArchName = ToolchainTriple.getArchName();
----------------
Adding the hardcoding here seems unfortunate. We have some code like this already in other places. It may be better to reuse the same logic. In particular, I'd expect we want to find program-prefixed names the same way as we did paths.

That seems to be done here https://github.com/llvm/llvm-project/blob/b6598bcf4b81ed8fb66a7c576a81e422750b9329/clang/lib/Driver/ToolChains/Linux.cpp#L236

While this function doesn't currently provide for a list of prefixes to be input, adding such a mechanism, and then having the code referenced above above add the prefix to the list, would seem better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71848/new/

https://reviews.llvm.org/D71848





More information about the cfe-commits mailing list