Skip to content
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

Create Android toolchain at Docker build time other than runtime #4851

Closed
wangkuiyi opened this issue Oct 16, 2017 · 2 comments
Closed

Create Android toolchain at Docker build time other than runtime #4851

wangkuiyi opened this issue Oct 16, 2017 · 2 comments

Comments

@wangkuiyi
Copy link
Collaborator

wangkuiyi commented Oct 16, 2017

The Dockerfile.android file runs build_android.sh in the CMD directive. It seems that this would make it build Android toolchain every time we run docker run. If so, it seems more reasonable to build the toolchain at Docker build time.

@Xreki
Copy link
Contributor

Xreki commented Oct 17, 2017

In fact, NDK is the official toolchain of Google. It contains all tools for all ANDROID_API and ANDROID_ABI. Standalone toolchain is a subset of NDK, and it is generated for specific ANDROID_ABI and ANDROID_API. The NDK is packaged into docker images, see.
Currently, Paddle can only be cross-compiled for Android using standalone toolchain. But for different arguments ANDROID_ABI and ANDROID_API, different version of standalone toolchain is needed to be generated. The main reason to build standalone toolchain every time when we run docker run, is to support all user given ANDROID_ABI and ANDROID_API.

@wangkuiyi
Copy link
Collaborator Author

Got it. I noticed that the building of standalone toolchain doesn't cost much time -- around 1 min. So it is reasonable to keep it in the docker-run stage.

@Xreki Xreki added this to Design & Doc in Embedded and Mobile Deployment Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants