danalbert added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1911 + SmallVector<std::string, 8> Prefixes; + if (TargetTriple.isAndroid()) + Prefixes.assign(D.PrefixDirs.begin(), D.PrefixDirs.end()); ---------------- I'm not entirely sure what `D.PrefixDirs` represents so maybe Android doesn't need this either. The behavior the NDK depends on is being able to find tools co-located with the Clang driver location. Aside from `as`, these are all LLVM tools (lld and co). The sysroot is expected to be in `$CLANG/../sysroot`. All our headers, libraries (aside from libgcc/libatomic), and CRT objects are located there. The clang driver install location is expected to also be a GCC install directory, so libgcc/libatomic are expected at `$CLANG/../lib/gcc/$TRIPLE/$GCC_VERSION`. Typical usage for the NDK does not involve `-gcc-toolchain` or `-B` at all. If I've understood correctly, your change can be applied to Android as well without breaking any of those behaviors. @srhines will need to comment on whether the Android platform build needs this, but aiui anyone depending on this behavior just needs to fix their build to use `-gcc-toolchain` where they were previously using `-B`. Of course, I can't speak to what our users with custom build systems that don't follow our docs might be doing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97993/new/ https://reviews.llvm.org/D97993 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits