================
@@ -584,14 +584,30 @@ void HexagonToolChain::getLibraryDir(const ArgList &Args,
llvm::sys::path::append(Dir, "lib");
}
std::string CpuVer = GetTargetCPUVersion(Args).str();
- llvm::sys::path::append(Dir, CpuVer);
- if (auto G = toolchains::HexagonToolChain::getSmallDataThreshold(Args))
- if (*G == 0)
- llvm::sys::path::append(Dir, "G0");
+ bool IsPicolibc = GetCStdlibType(Args) == ToolChain::CST_Picolibc;
+ bool IsG0 =
+ toolchains::HexagonToolChain::getSmallDataThreshold(Args).value_or(1) ==
+ 0;
bool IsStatic = Args.hasArg(options::OPT_static);
bool IsShared = Args.hasArg(options::OPT_shared);
- if (IsShared && !IsStatic)
- llvm::sys::path::append(Dir, "pic");
+ bool IsPic = (IsShared && !IsStatic) ||
----------------
quic-k wrote:
hm right, check should be
`IsPic = IsShared || hasArg(fPIC)`
true, we cannot have both IsShared and IsStatic
we can have IsStatic and IsPic tho, as you don't have to use a shared object
for -fPIC
https://github.com/llvm/llvm-project/pull/201326
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits