Please accept my apologies if this is not the correct forum for this question.
I’ve successfully built a single Rust compiler that targets the various iOS triples, and now I’m turning my attention to Android. I want a single Rust compiler that targets the two ARM Android triples. For background, my host is Darwin.
I have built separate stand-alone Rust compilers for
arm-linux-androideabi and for
aarch64-linux-android, but I am flummoxed by how to build a single Rust compiler that targets both triples.
The (perceived?) issue is that I can only configure rust with a single Android standalone NDK path (using the
--android-cross-path option), whereas I think I need to pass in two standalone NDK paths, one for each of the triple.
i.e., I am configuring rust thus:
./configure --target=arm-linux-androideabi,aarch64-linux-android --android-cross-path=/path/to/which-ndk
but I think I ought to be able to configure it thus (hypothetical syntax):
./configure --target=arm-linux-androideabi,aarch64-linux-android --arm-linux-androideabi-ndk=/path/to/arm-linux-androideabi-ndk --aarch64-linux-android-ndk=/path/to/aarch64-linux-android-ndk
The directory trees of the
arm-linux-androideabi-4.9 standalone NDKs collide in only a few places (the triple is used for most filenames/dirnames), so it is tempting to install both NDKs to a single directory and “hope for the best”. The places where they differ, however, seem important. Both standalone NDKs contain a
sysroot directory with custom header files and libraries for each triple, these are named identically in both NDKs and cannot coexist within a single directory tree.
I’m not talented enough to know whether the rust compilation process uses files from the standalone NDK sysroot directory or not. Thus my dilemma.
The questions, at last:
Has anyone successfully built (and used) a single Rust compiler that targets both ARM Android triples mentioned above?
If so, how did you setup the dual standalone NDKs?