================
@@ -498,27 +516,26 @@ std::string HexagonToolChain::getHexagonTargetDir(
   return std::string(Dir);
 }
 
-SmallString<128> HexagonToolChain::getEffectiveSysRoot() const {
+SmallString<128>
+HexagonToolChain::getEffectiveSysRoot(const ArgList &Args) const {
   const Driver &D = getDriver();
   // The user-specified `--sysroot` always takes precedence.
   if (!D.SysRoot.empty())
     return SmallString<128>(D.SysRoot);
-  // Otherwise, pick a path relative to the install directory. Try a triple
-  // subdirectory first.
+  // Otherwise, pick a path relative to the install directory.
   SmallString<128> Dir(getHexagonTargetDir(D.Dir, D.PrefixDirs));
-  llvm::sys::path::append(Dir, getTriple().normalize());
-  if (getVFS().exists(Dir))
-    return Dir;
-  // Otherwise, fall back to "../target/hexagon".
-  Dir = getHexagonTargetDir(D.Dir, D.PrefixDirs);
-  llvm::sys::path::append(Dir, "hexagon");
+  if (GetCStdlibType(Args) == ToolChain::CST_Picolibc) {
+    llvm::sys::path::append(Dir, "picolibc", getTriple().normalize());
+  } else {
+    llvm::sys::path::append(Dir, "hexagon");
+  }
----------------
quic-akaryaki wrote:

Yes, we need to keep compatibility with dinkumware.

https://github.com/llvm/llvm-project/pull/183257
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to