-
Notifications
You must be signed in to change notification settings - Fork 264
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
NDK r15 missing c++17 aligned allocation operators #421
Comments
That's surprising. There are some known failures in the libc++ tests right now, but none of them like that. Clang or GCC? |
Clang |
We'll be shipping an r15b to cover a misdefined API (libsync doesn't match its header). I'm going to investigate this today and see if there's a fix we can make at the same time. |
Looks like this just has to do with whether or not the compiler decides to use it or not. This test case: struct alignas(16) vec4 {
float x, y, z, w;
};
int main(int argc, char** argv) {
auto vectors = new vec4[16];
return 0;
} Only works on LP64 ABIs (when built with So, the reason this is happening is because we updated to a Clang that can take advantage of these, but we don't have a new enough libc++ to provide them. I got us up to matching the platform again last week, and was already planning to do a full update to HEAD for r16. Once that's done, this should be good to go. This isn't anything we can do something about for r15b though. Updating libc++ is much too high risk for a hotfix. You can maybe work around this by targeting C++14 instead. A lot of new stuff in libc++ gets backported to earlier standard versions, so other stuff you're trying to use might be available anyway. Unfortunately C++1z is still all experimental, so these sorts of things are somewhat expected. |
Good to know. FWIW, the former should be unblocked the next time we update the compiler (was https://reviews.llvm.org/D33287), and the latter is something on my list for r16 (though thanks for the reminder, I'd forgotten to actually assign it to the milestone). |
The libc++ update is in r16 now. It looks like we need a newer Clang to actually get all the libc++ tests working in C++1z mode (which we planned to have anyway, just noting that we don't have it yet). |
Test: ndk/run_tests.py Bug: android/ndk#421 Change-Id: I23b07ba8a064035bbc7dc4f2e1ec0e1ec85eb5c9
Test: ndk/run_tests.py Bug: android/ndk#421 Change-Id: I0765f5dffc6622f9b06a557b5a95d4900751c693
Test: ndk/run_tests.py Bug: android/ndk#421
Hi All, This issue seems to be back. Using NDK21d.
Compiling using std=c++14. Do I have to pass some extra lib when linking? |
Not enough information for me to know. The test case above works fine for me. File a bug with a repro case. |
Thanks! Mame test cases are always a pain to reproduce. I will try to create a small tc. |
This happens to our program after updating to NDK r15 - only on
armeabi-v7a
. Onarm64-v8a
it works correctly.My current workaround is to add this file to our codebase when using ARM7 slice:
The text was updated successfully, but these errors were encountered: