-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CLang support for android #637
Comments
This makes room for a Clang/LLVM version of the script
I made a first pass using Clang. It is not working at the moment. The documentation pretty much sucks, and that's par for the course. I would be interested in seeing the compiler options Eclipse uses when Clang is the compiler. Can you drop down into the command line, and use I'm guessing we need to build out a new table of The best I can tell, Clang is just plain broken:
|
Were you able to generate a list of the compiler options needed for Clang? I've got a partial |
Android is now switching over to cmake, which I guess is both good and bad for this. I've made a stab at something for this. ARM builds seemed to work fine (there are some settings needed in the cmake configuration in gradle to go with it too). The latest NDK seems to have broken x86. Maybe it just needs the right compile option? For crypto++ 7.0 I needed to patch
For x86_64 I get the following error though. I wonder if this is because an architecture flag is missing. The ones I'm setting so far are
|
Just in case it's of use to anybody, this is the android build file that we were using with |
I was able to use I made some modifications to our current script but things are failing pretty bad. I'll keep chiseling away at the problems. |
What is the current status for this? I can't seem to find a setenv-android-clang.sh in the repository or n the wiki? Also, with NDK v18, gcc has completely been removed and was replaced with a bash script that simply invokes clang, which means it is currently impossible to compile cryptopp for android with the recent NDK |
I also can extract compiler flags from Qt as well, if you need more examples, as Qt managed to completly port to clang. |
We have a cmake config that works for Android, Linux and Mac OS: https://github.com/KayEss/fost-crypto/blob/master/CMakeLists.txt |
@KayEss Thank you! I was able to create an qmake pro file based on your example that compiles successfully on all platforms I care for (including the arm64_v8a, armv7 and x86 android architectures). (See https://github.com/Skycoder42/QtDataSync/blob/master/src/3rdparty/cryptopp/cryptopp.pro). |
I'm going to close this report because we are working Issue 763, Building for Android using NDK not supported on Windows hosts. The 763 issue has an improved script that should close the gaps for compilers like Clang and GCC, and platforms like Linux and Windows. |
Clang is now the default NDK compiler for Android. Support for GCC has stopped.
Looking at Android (Command Line), it looks like there is no support to compile Crypto++ for Android using Clang.
setenv-android.sh
should support compiling with Clang.Also see Android NDK, Revision 16b (December 2017).
The text was updated successfully, but these errors were encountered: