Skip to content
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

Fix and simplify __has_builtin conditions #73905

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

am11
Copy link
Member

@am11 am11 commented Aug 13, 2022

  • gcc < v10 does not define the __has_builtin macro which I missed in unixstubs.cpp when making the previous change: 992cf8c. Some community legs like illumos use gcc v8.4 which were failing.
  • gcc v10+ supports __has_builtin macro which was being skipped due to version based conditions and we were forcing the fallback code path.

This PR moves __has_builtin macro check in two root headers which cover all the sources that are using it (pal.h and gcenv.base.h).

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Aug 13, 2022
@ghost
Copy link

ghost commented Aug 13, 2022

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details
  • gcc < v10 does not define the __has_builtin macro which I missed in unixstubs.cpp when making the previous change: 992cf8c. Some community legs like illumos use gcc v8.4 which were failing.
  • gcc v10+ supports __has_builtin macro which was being skipped due to version based conditions and we were forcing the fallback code path.

This PR moves __has_builtin macro check in two root headers which cover all the sources that are using it (pal.h and gcenv.base.h).

Author: am11
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit c2531ed into dotnet:main Aug 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-GC-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants