================
@@ -596,25 +614,23 @@ void HexagonToolChain::getHexagonLibraryPaths(const
ArgList &Args,
std::copy(D.PrefixDirs.begin(), D.PrefixDirs.end(),
std::back_inserter(RootDirs));
- std::string SysRoot(getEffectiveSysRoot());
+ std::string SysRoot(getEffectiveSysRoot(Args));
if (!llvm::is_contained(RootDirs, SysRoot))
RootDirs.push_back(SysRoot);
bool HasPIC = Args.hasArg(options::OPT_fpic, options::OPT_fPIC);
- // Assume G0 with -shared.
- bool HasG0 = Args.hasArg(options::OPT_shared);
+ bool HasG0 = false;
if (auto G = getSmallDataThreshold(Args))
HasG0 = *G == 0;
const std::string CpuVer = GetTargetCPUVersion(Args).str();
for (auto &Dir : RootDirs) {
std::string LibDir = Dir + "/lib";
std::string LibDirCpu = LibDir + '/' + CpuVer;
- if (HasG0) {
- if (HasPIC)
- LibPaths.push_back(LibDirCpu + "/G0/pic");
+ if (HasPIC)
+ LibPaths.push_back(LibDirCpu + "/G0/pic");
+ if (HasG0)
----------------
quic-akaryaki wrote:
It could be that you are right (or not), but changes to this logic are not
related to adding picolibc support.
https://github.com/llvm/llvm-project/pull/183257
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits