-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin #153912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ea73192
ee8c1ae
b1b2de3
bade8f3
3316f38
e993782
9cb052c
a78ae13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, | |
| #undef TARGET_OS | ||
| } | ||
|
|
||
| if (LangOpts.PointerAuthIntrinsics) | ||
| Builder.defineMacro("__PTRAUTH__"); | ||
|
Comment on lines
+1538
to
+1539
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we synchronize with GCC here (or does gcc not support this feature at all yet?)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe gcc has any support as yet? I recall talking to one gcc person in Sofia but it didn't sound like it's high priority.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so there's an existing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (we have __ARM_FEATURE_PAUTH already)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is also
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think @AaronBallman had an opinion on the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the complexity of the ptrauth abi surface area means that I don't think any single value can really represent it - there's significant variation for us in userspace vs kernel vs other constrained environments vs what the linux folk are doing. I think any dev who does need to work at this level will need to be directly detecting each single mode that is active |
||
|
|
||
| // Get other target #defines. | ||
| TI.getTargetDefines(LangOpts, Builder); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1089,6 +1089,7 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc, | |
| /// specified by the identifier as a standard language feature. | ||
| static bool HasFeature(const Preprocessor &PP, StringRef Feature) { | ||
| const LangOptions &LangOpts = PP.getLangOpts(); | ||
| const TargetInfo &Target = PP.getTargetInfo(); | ||
|
||
|
|
||
| // Normalize the feature name, __foo__ becomes foo. | ||
| if (Feature.starts_with("__") && Feature.ends_with("__") && | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both of these are clearly identical so I figured making them both darwin only given PTRAUTH serves the purpose for everything