D on android and d_android
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Apr 7 16:42:29 UTC 2020
On Tue, Apr 07, 2020 at 03:06:16PM +0000, Adam D. Ruppe via Digitalmars-d-learn wrote:
> On Tuesday, 7 April 2020 at 14:51:15 UTC, H. S. Teoh wrote:
> > 1) Follow LDC wiki to build an Android cross-compiler and
> > cross-compiled LDC libraries (this may already be prepackaged
> > with the latest LDC releases).
>
> They are - this is all automatic just-works now (if you download the
> right versions - my android-setup.d will grab the appropriate binaries
> from ldc repo for you).
Nice! I'm totally loving how the LDC maintainers have been packaging
everything in such a convenient, easy-to-use way. I've been doing
cross-compilation to Windows, and it's been great, I don't even need a
Windows machine, just cross-compile to Windows with the right triple and
library paths set in ldc2.conf, and it Just Works(tm).
> > 6) Cross-compile D code with LDC:
>
> And my android-setup.d also changes the ldc config file to automate
> most this - you just set the mtriple (and optionally, mcpu) and the
> rest is automatic too.
Very nice!
[...]
> I've had more bugs than time so the full-on "just works" promise is
> "your mileage may vary" but it is really getting simplified for these
> two steps.
The rest are Android-specific, but in theory easily scriptable (in fact,
I typed it up by copy-n-pasting from the output of my SCons build script
:P). So in theory, one *could* write a script that does it all in one
go.
T
--
People say I'm arrogant, and I'm proud of it.
More information about the Digitalmars-d-learn
mailing list