This is a follow up task to the introduction of aarch64-unknown-linux-pauthtest target.
In that PR, pointer authentication is enabled based on the target’s environment (for example additional function attributes). This approach introduces layering concerns and restricts the functionality to a single, hardcoded environment.
It would be preferable to decouple these features from specific targets/environments.
Clang provides a useful reference model here. It introduces language flags and corresponding feature definitions. Then maps platform (environment) to a set of language flags. These flags have default values, but can be overridden by the user. The resulting language options are then used to derive a target-agnostic set of features that ultimately define the signing schema.
This is a follow up task to the introduction of
aarch64-unknown-linux-pauthtesttarget.In that PR, pointer authentication is enabled based on the target’s environment (for example additional function attributes). This approach introduces layering concerns and restricts the functionality to a single, hardcoded environment.
It would be preferable to decouple these features from specific targets/environments.
Clang provides a useful reference model here. It introduces language flags and corresponding feature definitions. Then maps platform (environment) to a set of language flags. These flags have default values, but can be overridden by the user. The resulting language options are then used to derive a target-agnostic set of features that ultimately define the signing schema.