-
Notifications
You must be signed in to change notification settings - Fork 257
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
r26 armeabi-v7a libc++ probably not built as thumb #1953
Comments
Tentatively triaging to r26c. These are often quite difficult to diagnose when they weren't the result of something we did on purpose, and they're generally caused by upstream LLVM changes, and that can be anything from a change in optimization behavior to a correctness fix. @pirama-arumuga-nainar could one of you have a look and see if you can come up with an explanation? |
the libc++_shared.so in r26 has more symbols. |
Is that the reason for mylib.so growing though?
This is drastic enough that I'd bet the LLVM build doesn't build the runtimes as thumb... @rprichard (the other architectures grew, but considering we were quite behind on libc++, it's not surprising that they've added more code to libc++ in that time) |
For the specific binary liborxDemo.so shared in the bug report. the biggest contributors are .text and .ehframe
|
The toolchain folks say that the size increase for arm64 is within the expected range (new compiler means new behavior, different optimization decisions, and this size difference is within what we expect for that). The arm32 libc++ size increase does look like it wasn't built as thumb though (libc++ moved from the NDK to being part of the toolchain in r26, so the build process was redone). That's a thing we ought to fix. That alone won't be the trigger for r26c, but we'll pick up that fix in r26c when something else inevitably does. |
With https://android-review.googlesource.com/c/toolchain/llvm_android/+/2814878, the size of the arm libc++.so is 888K - it's still larger than r25 but it is expected with new compiler and libc++ (and in line with the rest of the platforms.) |
You know this better than me. But in our AAR project, we do set |
Your flags have no impact on the already-built libc++_shared.so. |
Fixed in r26, but we need an update for r27 still. |
Bug: android/ndk#1953 Change-Id: I6d51c995450e98490a70d0ac745bb46be601b102 Test: build.py and check size of arm32 libc++ (cherry picked from commit 44302de)
Changes: https://github.com/android/ndk/wiki/Changelog-r26#r26c * Updated LLVM to clang-r487747e. See AndroidVersion.txt and clang_source_info.md in the toolchain directory for version information. * [Issue 1928](android/ndk#1928): Fixed Clang crash in instruction selection for 32-bit armv8 floating point. * [Issue 1953](android/ndk#1953): armeabi-v7a libc++ libraries are once again built as thumb. `AndroidVersion.txt` contains: ``` 17.0.2 based on r487747e ```
Bug: android/ndk#1953 Change-Id: I6d51c995450e98490a70d0ac745bb46be601b102 Test: build.py and check size of arm32 libc++
Description
Merely switching from
25.1.8937393
to26.1.10909125
causes my.so
files to decrease somewhat in size, except forarm64-v8a
. Is this expected?Also, the
libc++_shared.so
is larger for allABIs
. Also expected?I did set
minSdk 21
inbuild.gradle
, but myApplication.mk
(accidently) containedAPP_PLATFORM := android-19
, so I'm not entirely sure whichSDK
was configured for theNDK
build. It should be noted thatmylib.so
is built in a project which depends on an.AAR
(whereAPP_STRIP_MODE
was set tonone
). Otherwise, no fancy settings.Application.mk
Attaching the
.so
files forarm64-v8a
:arm64-libs.zip
Affected versions
r26
Canary version
No response
Host OS
Windows
Host OS version
Windows 11
Affected ABIs
armeabi-v7a, arm64-v8a, x86, x86_64
Build system
ndk-build
Other build system
No response
minSdkVersion
21
Device API level
No response
The text was updated successfully, but these errors were encountered: