www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - LDC for iOS prebuilt binaries

reply Dan Olson <gorox comcast.net> writes:
I've made a set of binaries and universal libs for the LDC iOS
cross-compiler.  It is based on LDC 0.15.1 (2.066) and LLVM 3.5.1.

https://github.com/smolt/ldc-iphone-dev/releases/tag/ios-0.15.1-150708

Only 32-bit devices currently; arm64 work starts next month when I
acquire an iPhone 6.

The download should have everything needed to run on an OS X build host
in the same fashion as LDC downloads.  But I may have missed something.
Feedback appreciated.
-- 
Dan
Jul 08 2015
next sibling parent reply Manu via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
Possible to make cross compilers for other hosts?
Who uses a mac? ;)

On 9 July 2015 at 16:32, Dan Olson via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:
 I've made a set of binaries and universal libs for the LDC iOS
 cross-compiler.  It is based on LDC 0.15.1 (2.066) and LLVM 3.5.1.

 https://github.com/smolt/ldc-iphone-dev/releases/tag/ios-0.15.1-150708

 Only 32-bit devices currently; arm64 work starts next month when I
 acquire an iPhone 6.

 The download should have everything needed to run on an OS X build host
 in the same fashion as LDC downloads.  But I may have missed something.
 Feedback appreciated.
 --
 Dan
Jul 09 2015
parent reply Dan Olson <gorox comcast.net> writes:
Manu via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
 Possible to make cross compilers for other hosts?
 Who uses a mac? ;)
Hi Manu - I wish I knew the answer. I assume you are thinking Windows. I just looked at some stackoverflow answers, specifically at Xamarin.iOS for Windows, and all seem to require a Mac at somepoint in the iOS dev process. Just thinking now as I type: - druntime, and phobos as built should be fine, since they are already cross compiled for iOS/arm - ldc could be built as an iOS cross compiler on Windows with a little work - that leaves: cross linker (I think Apple open sources it), and app tools to create, sign, and download apps. Maybe someone in the field knows a solution. http://developer.xamarin.com/guides/ios/getting_started/installation/windows/ http://stackoverflow.com/questions/22358/how-can-i-develop-for-iphone-using-a-windows-development-machine -- Dan
Jul 09 2015
parent "Elvis Zhou" <elvis.x.zhou gmail.com> writes:
On Friday, 10 July 2015 at 05:38:47 UTC, Dan Olson wrote:
 Manu via Digitalmars-d-announce 
 <digitalmars-d-announce puremagic.com> writes:
 [...]
[...]
http://www.itoolchain.com/ or iPhone toolchain on cygwin
Jul 09 2015
prev sibling next sibling parent reply "Jack Stouffer" <jack jackstouffer.com> writes:
On Thursday, 9 July 2015 at 06:32:28 UTC, Dan Olson wrote:
 Only 32-bit devices currently; arm64 work starts next month 
 when I acquire an iPhone 6.

 The download should have everything needed to run on an OS X 
 build host in the same fashion as LDC downloads.
Great work. D will get a huge boost in popularity if it can work on mobile devices. Does this have any way to call the iOS Obj-C libraries for UI rendering and the like? Or is that a separate project?
Jul 10 2015
parent Dan Olson <gorox comcast.net> writes:
"Jack Stouffer" <jack jackstouffer.com> writes:
 Does this have any way to call the iOS Obj-C libraries for UI
 rendering and the like? Or is that a separate project?
It is a separate project and is gradually getting pulled into DMD: http://forum.dlang.org/post/mnm1sf$kp8$1 digitalmars.com For now, you can write UI part in Objective-C and rest as D. From D you could call any of the C-based graphics APIs (e.g. CGContextFillRect) but you'd have to write declarations - or try out Dstep: https://github.com/jacob-carlborg/dstep Another approach is using a framework with D bindings like Allegro5. http://forum.dlang.org/post/m2sicg48ff.fsf comcast.net This looked promising but I have not pursed beyond that post. -- Dan
Jul 10 2015
prev sibling parent reply "Rishub Nagpal" <rishub d3engine.com> writes:
On Thursday, 9 July 2015 at 06:32:28 UTC, Dan Olson wrote:
 I've made a set of binaries and universal libs for the LDC iOS 
 cross-compiler.  It is based on LDC 0.15.1 (2.066) and LLVM 
 3.5.1.

 https://github.com/smolt/ldc-iphone-dev/releases/tag/ios-0.15.1-150708

 Only 32-bit devices currently; arm64 work starts next month 
 when I acquire an iPhone 6.

 The download should have everything needed to run on an OS X 
 build host in the same fashion as LDC downloads.  But I may 
 have missed something. Feedback appreciated.
Good Work! I'd like to help get D to work on android, but I do not know much about llvm and arm compilers to be of much help. Last I heard there was an issue with exception handling and TLS, is that still so? anyway, good job!
Jul 10 2015
parent "Joakim" <dlang joakim.fea.st> writes:
On Friday, 10 July 2015 at 20:38:16 UTC, Rishub Nagpal wrote:
 On Thursday, 9 July 2015 at 06:32:28 UTC, Dan Olson wrote:
 I've made a set of binaries and universal libs for the LDC iOS 
 cross-compiler.  It is based on LDC 0.15.1 (2.066) and LLVM 
 3.5.1.

 https://github.com/smolt/ldc-iphone-dev/releases/tag/ios-0.15.1-150708

 Only 32-bit devices currently; arm64 work starts next month 
 when I acquire an iPhone 6.

 The download should have everything needed to run on an OS X 
 build host in the same fashion as LDC downloads.  But I may 
 have missed something. Feedback appreciated.
Good Work! I'd like to help get D to work on android, but I do not know much about llvm and arm compilers to be of much help. Last I heard there was an issue with exception handling and TLS, is that still so?
That's funny, because I was just thinking about putting my Android patches for ldc online and trying to get more people to chip in on working through the remaining tests to be fixed for Android/ARM. I got TLS working a month and a half ago (http://forum.dlang.org/post/imkgasjuvbbasyghdggs forum.dlang.org) and exception-handling seems to be working since this fix I ferreted out last week (http://forum.dlang.org/post/qsfaussopqwwjuljdjrt forum.dlang.org). Now it's just codegen issues, with about half of phobos modules' tests failing somewhere, though many of those modules only have a handful of tests that fail. For example, only three unit test blocks fail in std.stdio and one in std.path. Common causes appear to be problems with ranges and functions from std.random. I'm going through each module and commenting out failing tests and checking backtraces, a time-consuming process that's got me thinking about hacking the test runner, so that failing tests in one unit test block won't stop other test blocks from the same module from running, as is the case now. If you or anybody else is interested in chipping in, reply in the Android thread (first link above) and I'll put some patches and build info online. Unfortunately, to really fix any of these issues, you'll probably have to know something about ARM assembly, LLVM IR, and be comfortable stepping through the binary with gdb but without debug info, although simply triaging the tests to figure out what works and what doesn't could probably be done by almost anyone.
Jul 10 2015