CMake configuration for cross building for Android #9174
|
/cc @janvorli |
| @@ -0,0 +1,128 @@ | ||
| +# Need to verify this | ||
| +SET( HAVE_COMPATIBLE_EXP_EXITCODE |
I assume these constants were tested on Android and not just copied from their Linux versions, right?
I ran the test you posted here for HAVE_COMPATIBLE_EXP_EXITCODE on-device; it's correct for Android API level 22 but could need testing for other levels, if possible
I will double check this - @cydhaselton do you still have a termux environment where you can invoke the CoreCLR build scripts on an Android device?
@cydhaselton Could you paste the contents of bin/obj/Linux.arm64.Debug/CMakeCache.txt in pastbin? That would allow me to verify the contents of this files with what you're seeing in the Termux environment.
@qmfrederik Yes. Just let me know if there's a particular branch you want me to clone to device and I'll get you the results
@cydhaselton I think the best would be to run it on vanilla coreclr/master
Link to CMakeCache.txt file: http://pastebin.com/pYChxXS1
From vanilla coreclr/master
|
@janvorli I updated the values in @cydhaselton There are a couple of other PRs pending in CoreCLR that should fix issues with 64-bit ARM; once they come through, things should start looking good for .NET Core on Android :) |
|
@dotnet-bot test this please |
|
@janvorli Is this one good to go? |
|
@qmfrederik I am sorry again for this going out of my radar. |
This PR adds CMake files which support cross building for Android.
You can cross-build assuming
ROOTFS_DIRpoints to thesysrootfolder for the toolchain which was generated by Android. That is, we assume the toolchain can be found in${ROOTFS_DIR}/../bin.I've placed them in cross/android/arm64.
You can then use a command like:
to cross-compile for Android.
I'll create a PR for scripts that can generate the toolchain shortly.