phosek added inline comments.
================ Comment at: clang/lib/Driver/Driver.cpp:1176-1210 + // If command line flags such as -m32, etc. changed parts of the triple that + // are not just changes to normalization, we also need to update the raw + // triple string that is used to find tools. This ensures e.g. that clang -m32 + // searches for i386-*-ld instead of x86_64-*-ld when linking (and also uses + // the triple-prefixed library paths). + EffectiveTargetTriple = + computeTargetTriple(*this, RawTargetTriple, *UArgs, ""); ---------------- I think this should be handled by each toolchain. For example `Linux` toolchain already [has getMultiarchTriple](https://github.com/llvm/llvm-project/blob/16fe741c69429235210c03c46420f8fa6aece4a1/clang/lib/Driver/ToolChains/Linux.cpp#L40) which takes into account target handling on various existing platforms like Debian. What I've been thinking of doing is to move that method to the `ToolChain` class as virtual so it could be overriden and customized by each toolchain, and then use it in [getRuntimePath](https://github.com/llvm/llvm-project/blob/16fe741c69429235210c03c46420f8fa6aece4a1/clang/lib/Driver/ToolChain.cpp#L485). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100054/new/ https://reviews.llvm.org/D100054 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits