[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 01:13:38 PST 2025
================
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) {
return std::string(SysRootDir);
}
+// GCC sysroot here means form sysroot from either --gcc-install-dir, or from
+// --gcc-toolchain or if the toolchain is installed alongside clang in
+// bin/../<TargetTriple> directory if it is not explicitly specified on the
+// command line through `--sysroot` option. libc here will be newlib.
+std::string BareMetal::computeGCCSysRoot() const {
+ if (!getDriver().SysRoot.empty())
+ return getDriver().SysRoot;
----------------
petrhosek wrote:
This check shouldn't be necessary.
https://github.com/llvm/llvm-project/pull/121829
More information about the cfe-commits
mailing list