-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object #121831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object #121831
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -375,6 +375,28 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { | |||||
return llvm::reverse(Default); | ||||||
} | ||||||
|
||||||
ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { | ||||||
if (getTriple().isRISCV() && IsGCCInstallationValid) | ||||||
return ToolChain::CST_Libstdcxx; | ||||||
return ToolChain::CST_Libcxx; | ||||||
} | ||||||
|
||||||
ToolChain::RuntimeLibType BareMetal::GetDefaultRuntimeLibType() const { | ||||||
if (getTriple().isRISCV() && IsGCCInstallationValid) | ||||||
return ToolChain::RLT_Libgcc; | ||||||
return ToolChain::RLT_CompilerRT; | ||||||
} | ||||||
|
||||||
// TODO: Add a validity check for GCCInstallation. | ||||||
// If valid, use `UNW_Libgcc`; otherwise, use `UNW_None`. | ||||||
ToolChain::UnwindLibType | ||||||
BareMetal::GetUnwindLibType(const llvm::opt::ArgList &Args) const { | ||||||
if (getTriple().isRISCV()) | ||||||
return ToolChain::UNW_None; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this return
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case would it be possible to leave There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||
|
||||||
return ToolChain::GetUnwindLibType(Args); | ||||||
} | ||||||
|
||||||
void BareMetal::AddClangSystemIncludeArgs(const ArgList &DriverArgs, | ||||||
ArgStringList &CC1Args) const { | ||||||
if (DriverArgs.hasArg(options::OPT_nostdinc)) | ||||||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make it conditional only on valid GCC installation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case would it be possible to leave
TODO
comment here to make sure we address this in a follow up change?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done