Clang compiler not honoring -mstackrealign


We are developing a native application in Android. We are using SIMD optimizations on it.

We want to use -mstackrealign option to make all the function parameters and local variables to be aligned to 16 bytes.

But CLANG compiler on x86 Android platform is not honoring the flag.

Any work arounds to make all functions in the project to stack aligned by 16 bytes.


Gowtham Reddy

Can you provide a minimal reproducer that shows Clang failling to align the stack with mstackrealign?