[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

Lu Weining via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 28 18:12:07 PST 2023


SixWeining added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:41
 /// so we provide a rough mapping here.
 std::string Linux::getMultiarchTriple(const Driver &D,
                                       const llvm::Triple &TargetTriple,
----------------
Missing test. Perhaps add some in `clang/test/Driver/linux-ld.c` and `clang/test/Driver/linux-header-search.cpp`? Or postpone this change until loongarch is upstreamed to Debian?


================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:93
+
+    if (TargetTriple.isGNUEnvironment()) {
+      Libc = "gnu";
----------------
Should only check `{GNU|GNUF32|GNUF64}`?


================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:95
+      Libc = "gnu";
+    } else if (TargetTriple.isMusl()) {
+      Libc = "musl";
----------------
Should only check `Triple::Musl`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142688



More information about the cfe-commits mailing list