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

Android & iOS: Enable strict aliasing #98380

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

RandomShaper
Copy link
Member

For some reason, these platforms were being built with the strict aliasing rule disabled, which can prevent certain optimizations. All the other platforms are built without them, so it should be fine.

The only reason I can think of why this is necessary is that the code didn't work well otherwise because -fno-strict-aliasing was compensating for an overrelyance on memory ordering on non-ARM platforms. That wouldn't be a long-term good reason for it, though.

Copy link
Contributor

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

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

Tested with the Android editor build on a Pixel 9 device; works as expected.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Tested iOS build with a few projects on Mac and 10. gen. iPad, seem to be working fine.

@Repiteo Repiteo merged commit 1001a8c into godotengine:master Oct 24, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 24, 2024

Thanks!

@RandomShaper RandomShaper deleted the mobile_strict_alias branch October 24, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants