Ever want to compile D on your Android phone? Well, now you can!
Joakim via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue Jan 26 23:48:53 PST 2016
On Wednesday, 27 January 2016 at 06:04:43 UTC, Laeeth Isharc
wrote:
> https://www.reddit.com/r/programming/comments/42w404/dlang_llvmbacked_compiler_alpha_release_for/
Thanks, I wondered if it had been posted, as it's the kind of
oddity they might enjoy. :)
On Wednesday, 27 January 2016 at 07:01:30 UTC, Vadim Lopatin
wrote:
> On Sunday, 24 January 2016 at 15:12:30 UTC, Joakim wrote:
>> An alpha release of ldc, the llvm-based D compiler, for
>> Android devices is now available. It is best used with the
>> excellent Termux app
>> (https://play.google.com/store/apps/details?id=com.termux&hl=en) and a bluetooth keyboard. ;) Updated test runners, that run most tests from the standard library on any Android device, are also available (results have been reported for everything from a TomTom BRIDGE GPS navigation device to a Huawei Watch):
>>
>> https://github.com/joakim-noah/android/releases/tag/polish
>>
>
> Cannot build ldc for Android according to instructions
> http://wiki.dlang.org/Build_LDC_for_Android
>
> git clone --recursive
> https://github.com/ldc-developers/ldc.git
> cd ldc/
> git submodule update
> curl -O https://gist.githubusercontent.com/joakim-
> noah/63693ead3aa62216e1d9/raw/b89d77d66a80206b4dd3d78bb10d83a7e368f3d4/ldc_android_arm
> git apply ldc_android_arm
>
> Patch cannot be applied to current ~master
> I've tried to checkout several recent tagged versions - doesn't
> work too.
> Probably it's applicable only to some particular LDC version.
> What version of ldc should I checkout to apply this patch?
>
> (Building LDC on Windows)
It's not hard to figure out, as 'git apply ldc_android_arm' says
it fails on dmd2/root/port.c and 'git log dmd2/root/port.c' shows
this recent change to master:
https://github.com/ldc-developers/ldc/commit/556e3a691f72b97cce31d85740e8dc12cafc9f53#diff-2268700876655bdfa9d178b9cc466277
I've updated the gist and wiki page to take that change into
account; simply download the new gist, as shown on a reloaded
wiki page.
Also, I haven't tried cross-compiling from Windows, so you may
run into other problems there. The main one I can think of is
that the test runner targets I added to CMake may have an issue,
but there could be additional incompatibilities that I simply
haven't run into on linux. Hopefully, it just works. :)
Anyway, this is a good reason to get all this stuff merged soon,
which is what I was looking into now anyway, although that
particular change is from Kai's long-unmerged longdouble2 branch.
More information about the Digitalmars-d-announce
mailing list