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

Improving the Android build process, support different toolchains and Standard C++ library runtimes #645

Open
jwtowner opened this issue Jan 3, 2018 · 4 comments

Comments

@jwtowner
Copy link

jwtowner commented Jan 3, 2018

Hi, I'd like to improve the build process for Android, including shell scripts, build files and patches to OpenSSL and Boost, to allow for more build variants wherein we can migrate towards using newer Android NDK toolchains, use Clang/LLVM toolchain to build OpenSSL, use libc++ instead of libstdc++, and so on.

Since Android NDK 15c is being bundled with the upcoming MSVS 2017 15.6 release, we'd like to be able to build against libc++ so that we can use C++14 language and library features not available with libstdc++ 4.8/4.9.

As part of this, I'd also like to make it possible to build the dependencies (OpenSSL, Boost) within the Windows Subsystem for Linux instead of a full standalone Linux system. Some of the shell scripts are currently incompatible with WSL due to stray carriage return line endings.

My current progress consists of having OpenSSL building with both GCC and Clang toolchains in Android NDKs 10 through 15, as well as OpenSSL 1.0.2k through 1.0.2n, using WSL as the build environment. I've removed the dependency on the setenv-android.sh shellscript and have rolled all of the environment setup directly into Build_android/openssl/Makefile.

I'm wondering if you'd be interested in accepting pull requests for this and if you'd like it all in one big patch or as multiple smaller patches?

@ras0219-msft
Copy link
Contributor

Yes, I'd be happy to review changes in this direction!

I would prefer smaller patches when possible that each provide individual value. For example, please submit the changes to Boost separately from OpenSSL.

@jwtowner
Copy link
Author

Got the go ahead from legal to sign the CLA. PR #662 improves how OpenSSL is built for Android, and is now ready for review. Thanks!

@jwtowner
Copy link
Author

jwtowner commented Mar 6, 2018

I've updated the build scripts and patches for building Boost on Android. Please see PR #711 for review. Thanks.

@jwtowner
Copy link
Author

jwtowner commented Mar 13, 2018

PR #714 is the last pull request for this feature, and I believe the final changes are in for the other PRs. I've tested cpprestsdk and dependencies built against Android NDK r15c using Clang 5 and the c++_static (libc++) runtime library, coupled with Xbox Live in a large scale game product for Android built in MSVS 2017 15.6.1. Everything seems to working working great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants