[clang] [llvm] [RISC-V] Disable save-restore with shadow stack (PR #225610)
Nemanja Ivanovic via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 7 00:11:59 PDT 2026
================
@@ -213,6 +214,19 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple,
for (const std::string &TF : TuneFeatures)
Features.push_back(Args.MakeArgString(TF));
+ if (Args.getLastArg(options::OPT_msave_restore)) {
+ auto FCFArgVal = Args.getLastArgValue(options::OPT_fcf_protection_EQ);
+ if (Args.hasArg(options::OPT_fcf_protection) || FCFArgVal == "return" ||
+ FCFArgVal == "full")
----------------
nemanjai wrote:
Oh, I see. So I would have to also check `OPT_mno_save_restore`. Thank you for clarifying.
https://github.com/llvm/llvm-project/pull/225610
More information about the cfe-commits
mailing list