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

Attributes translation #57

Closed
wants to merge 6 commits into from
Closed

Attributes translation #57

wants to merge 6 commits into from

Conversation

auroraeosrose
Copy link

This turns gcc attribute functionality into macros that can be used
it also allows for easy fallback if the cmake system detects alignas/alignof support, provides maxalign and specific align macros, takes care of inline and noline

packing structs is rather ugly, but this seems to be the least ugly of the hacky workarounds for the differences in implementationation

__attribute__ is very compiler specific, this supports forcing inline
and forcing noinline for gcc and msvc - clang will try to act like gcc
on nix systems and msc on windows
unfortunately the pragma push/pop syntax is ugly which makes the macros
a little more obnoxious
this will make everything fallback to c++11 alignas and alignof if
they're detected to be working, but will use platform specific
alignas/alignof/max align if not
the only remaining __attribute__ uses are ifdef'd off by sanitizer,
ifunc, and weak ref checks
since it's not using portability, have to do the same thing here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant