[PATCH] D115049: Fall back on Android triple w/o API level for runtimes search

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 6 13:15:55 PST 2021


thakis added a comment.

This looks right to me.



================
Comment at: clang/lib/Driver/Driver.cpp:1846
+    if (RuntimePaths.size() > 0 && getVFS().exists(RuntimePaths[0]))
+      llvm::outs() << RuntimePaths[0] << '\n';
     else
----------------
This either needs to print all of them, or the first existing one. The first existing one sounds right actually. Currently it only prints the first one if the first one exists.


================
Comment at: clang/lib/Driver/ToolChain.cpp:500
+  if (getTriple().isAndroid() &&
+      getTriple().getEnvironmentName() != "android") {
+    llvm::outs() << getTriple().getEnvironmentName() << "\n";
----------------
Why do you need the environment check?


================
Comment at: clang/lib/Driver/ToolChain.cpp:501
+      getTriple().getEnvironmentName() != "android") {
+    llvm::outs() << getTriple().getEnvironmentName() << "\n";
+    llvm::Triple TripleWithoutLevel = getTriple();
----------------
leftover debug logging


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115049



More information about the cfe-commits mailing list