Closed vouillon closed 8 years ago
Why would NDK be duplicated?
Ah, you mean if I do the --alias-of thing with OPAM. I think I have a solution for both issues.
I'll add a conf-android-abi package that gathers and saves the parameters of the environment, including NDK path, ABI, architecture, and so on. Then, packages could use variables to fetch that information back.
This is what I had in mind, indeed.
By the way, if you like my approach to Android port better (I hope you do--I embarked on this with an explicit intent to make it simpler and more clear), I could add you as a collaborator.
The ports should converge at some point. So, yes, I'm interested in being a collaborator. But I don't have the time to work on this at the moment.
Amy news on how to compile for x86 at current? Is it only possible with @vouillion 's package and not this one?
@lingz you should be able to build for x86 by creating a separate switch and installing the compiler with ANDROID_ARCH
set correctly. I don't recall offhand what the right value is but something like x86
might work?
For creating a separate switch do you mean to fork the opam-android32 package and modify the files there to add a case for arch=x86?
Ah sorry. I forgot that I haven't pushed the changes yet that make switching platforms simple. I should do it within a week or so.
Ah that would be great. Thanks and look forward to it.
Done (both hard-float ABI support and x86 support); please see README to see how would this be used.
The toolchain is currently configured to target the ARMv5TE architecture.
It should be possible to generate ARMv7 code as well, as it is supported by most Android devices, uses hard floating points, and is more compact (OCaml will generate Thumb-2 instructions by default). You can have a look at how https://github.com/vouillon/ocaml-android does it. I think the selection should be done through an environment variable as with
ANDROID_LEVEL
.The x86 architecture should be supported as well.
A concern is that the Android NDK is going to be duplicated for each all compiler. Maybe one can just extract the relevant platform and toolchain?