The OCaml repo has a make crossopt option which in theory should allow cross-compiling to Android and other linux-like systems. How mature is this feature? Should I be expecting errors?
Cross-compilation to x86_64-linux-android21 is tested in the CI. I’ve confirmed manually that it was working in the past months, but the test doesn’t go further than building the cross-compiler, compiling a simple program, and running the program in the emulator.
Don’t forget to specify the api level (here, 21) in the target triplet.
2 Likes