nemanjai added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2152
         ChosenToolsetVersion = ToolsetVersion;
-        ChosenToolsetDir = "/opt/rh/" + ToolsetDir.str();
+        ChosenToolsetDir = "/opt/rh/" + ToolsetDir.str() + "/root/usr";
       }
----------------
I believe this will cause a failure with the unit test added in the original 
patch.

And presumably since the unit test tests for paths that don't include 
`/root/usr`, there are real world toolsets that also don't use that suffix. So 
we should presumably add both `Prefixes`.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2157
     if (ChosenToolsetVersion > 0)
       Prefixes.push_back(ChosenToolsetDir);
   }
----------------
Can we not just change this to something like:
```
    if (ChosenToolsetVersion > 0) {
      Prefixes.push_back(ChosenToolsetDir);
      Prefixes.push_back(ChosenToolsetDir + "/root/usr");
    }
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127310

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to