[clang] [llvm] Add clang driver changes to support MTI RISC-V (PR #134065)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 16:07:50 PDT 2025


================
@@ -424,8 +432,19 @@ std::string Linux::computeSysRoot() const {
   const StringRef InstallDir = GCCInstallation.getInstallPath();
   const StringRef TripleStr = GCCInstallation.getTriple().str();
   const Multilib &Multilib = GCCInstallation.getMultilib();
+  std::string Path;
+  if (getTriple().isRISCV()) {
+    Path =
+        (InstallDir + "/../../../../sysroot" + Multilib.osSuffix() + "/../..")
+            .str();
+
+    if (getVFS().exists(Path))
+      return Path;
+
+    return std::string();
+  }
----------------
ilovepi wrote:

I see tests for target features, but I think you should have tests for these paths too.

https://github.com/llvm/llvm-project/pull/134065


More information about the llvm-commits mailing list