stdlib code size increase in nightly-2024-09-01 for aarch64-linux-android #130320
Description
We keep track of our code size on Android to keep our overall download size down. In updating our pinned nightly compiler (from nightly-2024-06-21; we're due for it), our CI turned up a code size increase of ~120KB in a library that's overall about 4.6MB—not huge, but not expected either. Bisecting on Rust toolchains turned up that the regression was introduced in nightly-2024-09-01 (as in, nightly-2024-08-30 does not have this extra code size, and there was no nightly-2024-08-31), and moreover I discovered that using -Zbuild-std recovered the additional code size. So something changed in how the prebuilt standard library is built, in a way that may not have been intended.
Unfortunately, our Android build process does a whole bunch of work at once, so I don't have a minimal example for you. My reproduction has been
- Install the Android NDK (27.0.12077973 is the one we're currently using)
- Check out /~https://github.com/signalapp/libsignal/releases/tag/v0.57.1
ANDROID_NDK_HOME=path/to/ndk/27.0.12077973 java/build_jni.sh android-arm64
- Save the resulting library, then repeat with
RUSTUP_TOOLCHAIN=nightly-2024-09-01
. - Compare the libraries' post-stripped sizes, or use a tool like
bloaty
to measure VM size only
It's possible this change was expected, in which case please close the issue; I understand code sizes go up sometimes!
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged