[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.
Momchil Velikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 03:03:40 PDT 2020
chill added a comment.
In D80791#2196598 <https://reviews.llvm.org/D80791#2196598>, @nsz wrote:
> the assumption is that the intended branch protection is implied via cmdline flags for the tu and function attributes are only used in source code for some hack.
I don't share this assumption. I find it just as valid to control the PAC/BTI with things like:
#ifdef ENABLE_BTI
#define BTI_FUNC __attribute__((target("branch-protection=bti")))
#else
#define BTI_FUNC
BTI_FUNC void foo() { ...
BTI_FUNC int bar() { ...
without using any command-line option other than `-DENABLE_BTI=1`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80791/new/
https://reviews.llvm.org/D80791
More information about the llvm-commits
mailing list