[clang] [Clang][AArch64] Command-line options for A-profile's Sign Return Address Hardening (PR #176171)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 17 03:57:08 PDT 2026


smithp35 wrote:

To back up what Victor mentioned. As adding `-mbranch-protection` will override a distro clang default `-mbranch-protection` we wanted to be able to add the additional mitigation against Pacman without having to look up what the distro default was.

We chose `-mharden-pac-ret` to try and fit in with the existing speculation mitigations such as `-mharden-sls` and `-mspeculative-load-hardening`.

Could possibly include speculation in the name to guide a user to the additional hardening, which I expect many users not to make the trade-off. For example `-mharden-pac-ret-speculation` 



https://github.com/llvm/llvm-project/pull/176171


More information about the cfe-commits mailing list