[clang] [llvm] [PAC][Driver] Support `pauthtest` ABI for AArch64 Linux triples (PR #97237)
Daniil Kovalev via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 01:50:15 PDT 2024
================
@@ -1546,16 +1581,28 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back(
Args.MakeArgString(Twine("-msign-return-address=") + Scope));
- if (Scope != "none")
+ if (Scope != "none") {
+ if (Triple.getEnvironment() == llvm::Triple::PAuthTest)
+ D.Diag(diag::err_drv_unsupported_opt_for_target)
+ << A->getAsString(Args) << Triple.getTriple();
CmdArgs.push_back(
Args.MakeArgString(Twine("-msign-return-address-key=") + Key));
- if (BranchProtectionPAuthLR)
+ }
+ if (BranchProtectionPAuthLR) {
+ if (Triple.getEnvironment() == llvm::Triple::PAuthTest)
+ D.Diag(diag::err_drv_unsupported_opt_for_target)
+ << A->getAsString(Args) << Triple.getTriple();
CmdArgs.push_back(
Args.MakeArgString(Twine("-mbranch-protection-pauth-lr")));
+ }
if (IndirectBranches)
CmdArgs.push_back("-mbranch-target-enforce");
- if (GuardedControlStack)
+ if (GuardedControlStack) {
----------------
kovdan01 wrote:
Added a comment, thanks! See 4f3da9e51338aec21b8bfe8dd08598507edcea38
https://github.com/llvm/llvm-project/pull/97237
More information about the cfe-commits
mailing list