Skip to content

Fix and simplify __has_builtin conditions - #73905

Merged
jkotas merged 1 commit into
dotnet:mainfrom
am11:feature/build/native
Aug 14, 2022
Merged

jkotas merged 1 commit into
dotnet:mainfrom
am11:feature/build/native

Conversation

@am11

@am11 am11 commented Aug 13, 2022

Copy link
Copy Markdown
Member
  • 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).

@am11
am11 requested a review from MichalStrehovsky as a code owner August 13, 2022 19:40
@ghost ghost added area-GC-coreclr community-contribution Indicates that the PR has been added by a community member labels Aug 13, 2022
@ghost

ghost commented Aug 13, 2022

Copy link
Copy Markdown

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: -

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

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