[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 19:32:35 PDT 2025


================
@@ -206,6 +206,15 @@ std::string BareMetal::computeSysRoot() const {
   return computeClangRuntimesSysRoot(D, /*IncludeTriple*/ true);
 }
 
+std::string BareMetal::getCompilerRTPath() const {
+  if (IsGCCInstallationValid || detectGCCToolchainAdjacent(getDriver())) {
+    SmallString<128> Path(getDriver().ResourceDir);
----------------
petrhosek wrote:

```suggestion
  const Driver &D = getDriver();
  if (IsGCCInstallationValid || detectGCCToolchainAdjacent(D)) {
    SmallString<128> Path(D.ResourceDir);
```

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


More information about the cfe-commits mailing list