-
Notifications
You must be signed in to change notification settings - Fork 382
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
Reduce Android image sizes. #747
Conversation
bors r+ |
Merge conflict. |
@Alexhuszagh can you rebase? |
037fb19
to
9e87b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r=otavio,emilgardis
747: Reduce Android image sizes. r=otavio,emilgardis a=Alexhuszagh Delete unused toolchains to save ~600MB in our total image sizes. This is done by removing the toolchains for other targets in `/android-ndk/sysroot/usr/lib/`. Closes #739. Co-authored-by: Alex Huszagh <[email protected]>
Build failed: |
Ok this has issues for aarch64 and i686, not sure why but I'm marking as a draft until I fix this. I checked armv7 and arm, so I assumed this was working. Oh right, we have the following in the Dockerfiles: RUN /android-ndk.sh x86 28
RUN /android-ndk.sh arm64 28 |
Delete unused toolchains to save ~600MB in our total image sizes. This is done by removing the toolchains for other targets in `/android-ndk/sysroot/usr/lib/`. Closes cross-rs#739.
9e87b5f
to
da9aa4e
Compare
bors try --target android |
Ok I've fixed these issues by converting the provided architecture to the triple prefix: local triple_arch="${arch}"
case "${arch}" in
arm64)
triple_arch="aarch64"
;;
x86)
triple_arch="i686"
;;
esac
triples=(...)
for triple in "${triples[@]}"; do
if ! [[ "${triple}" =~ ^"${triple_arch}".* ]]; then
rm -rf "/android-ndk/sysroot/usr/lib/${triple}"
fi
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
tryBuild succeeded: |
Build succeeded: |
Delete unused toolchains to save ~600MB in our total image sizes. This is done by removing the toolchains for other targets in
/android-ndk/sysroot/usr/lib/
.Closes #739.