[llvm-branch-commits] [clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)
Garvit Gupta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 4 13:17:08 PDT 2025
================
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const {
return llvm::reverse(Default);
}
+ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
+ return ToolChain::CST_Libstdcxx;
+ return ToolChain::CST_Libcxx;
+}
+
+ToolChain::RuntimeLibType BareMetal::GetDefaultRuntimeLibType() const {
+ if (getTriple().isRISCV() && GCCInstallation.isValid())
+ return ToolChain::RLT_Libgcc;
+ return ToolChain::RLT_CompilerRT;
+}
+
+ToolChain::UnwindLibType
+BareMetal::GetUnwindLibType(const llvm::opt::ArgList &Args) const {
+ if (getTriple().isRISCV())
----------------
quic-garvgupt wrote:
This is done because in RISCVToolchain, it was UNW_NONE. It seems counter-intuitive however this is done to perserve the behavior of both RISCVToolchain and BareMetal toolchain
https://github.com/llvm/llvm-project/pull/121831
More information about the llvm-branch-commits
mailing list