options::OPT_mbranch_protection_EQ)
: Args.getLastArg(options::OPT_mbranch_protection_EQ);
if (!A) {
- if (Triple.isOSOpenBSD()) {
+ if (Triple.isOSOpenBSD() && isAArch64) {
CmdArgs.push_back("-msign-return-address=non-leaf");
CmdArgs.push_back("-msign-return-address-key=a_key");
CmdArgs.push_back("-mbranch-target-enforce");
D.Diag(diag::err_drv_unsupported_option_argument)
<< A->getSpelling() << Scope;
Key = "a_key";
- if (Triple.isOSOpenBSD())
+ if (Triple.isOSOpenBSD() && isAArch64)
IndirectBranches = true;
else
IndirectBranches = false;