recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
MIT License
2.34k stars 231 forks source link

more robust __builtin_assume_aligned detection #341

Closed Akaricchi closed 1 year ago

Akaricchi commented 1 year ago

__builtin_assume_aligned is available since GCC 4.7, but __has_builtin was added much later. Check for the GCC version if __has_builtin is not available.

Users can also define CGLM_HAVE_BUILTIN_ASSUME_ALIGNED to either 1 or 0 to explicitly enable/disable the use of __builtin_assume_aligned. Meson will do it automatically (by performing a configure-time test).

recp commented 1 year ago

@Akaricchi thanks for your contributions, the PR is merged 🚀