[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 11:25:41 PST 2024
================
@@ -291,6 +365,36 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV()) {
+ return GCCInstallation.isValid() ? ToolChain::CST_Libstdcxx
+ : ToolChain::CST_Libcxx;
+ }
+ return ToolChain::CST_Libcxx;
+}
+
+ToolChain::RuntimeLibType BareMetal::GetDefaultRuntimeLibType() const {
+ if (getTriple().isRISCV()) {
+ return GCCInstallation.isValid() ? ToolChain::RLT_Libgcc
+ : ToolChain::RLT_CompilerRT;
+ }
+ return ToolChain::RLT_CompilerRT;
----------------
petrhosek wrote:
```suggestion
if (getTriple().isRISCV() && GCCInstallation.isValid())
return ToolChain::RLT_Libgcc;
return ToolChain::RLT_CompilerRT;
```
https://github.com/llvm/llvm-project/pull/118809
More information about the cfe-commits
mailing list