My Android project nearing beta
Adam D. Ruppe
destructionator at gmail.com
Tue Dec 31 03:59:58 UTC 2019
On Wednesday, 18 December 2019 at 15:53:14 UTC, kinke wrote:
> Heh, it looks like the Wiki page
> (https://wiki.dlang.org/Cross-compiling_with_LDC - I've added
> an exemplary Android section there as well, using `-gcc` to
> specify the NDK's preconfigured clang) needs some overhaul then
> if not even you guys seem to find the relevant information.
Well, I worked this into my setup program. It changes ldc2.conf
so then you can just
dub build --compiler=ldc2 -a i386-none-linux-android
@mv libdubtest.so BasicActivity/app/src/main/jniLibs/x86
|| true
#
dub build --compiler=ldc2 -a armv7a-none-linux-android
@mv libdubtest.so
BasicActivity/app/src/main/jniLibs/armeabi-v7a || true
#
dub build --compiler=ldc2 -a x86_64-none-linux-android
@mv libdubtest.so
BasicActivity/app/src/main/jniLibs/x86_64 || true
#
dub build --compiler=ldc2 -a aarch64-none-linux-android
@mv libdubtest.so
BasicActivity/app/src/main/jniLibs/arm64-v8a || true
I really wish dub had a way to specify the output directory on
its command line which would eliminate the need for those ugly mv
commands :(
but meh now it works without the helper programs - just a setup
step.
Meanwhile, I wrote a class/jar -> D interface converter and it
works beautifully. Alas, dmd is giving me "forward reference"
errors in there :(
so the crtp trick is triggering a bunch of internal compiler bugs.
ugh.
More information about the Digitalmars-d-announce
mailing list