Windows --> arm-linux cross compiler and lld

kinke noone at nowhere.com
Wed Apr 18 21:07:01 UTC 2018


On Wednesday, 18 April 2018 at 19:08:50 UTC, Jacob Carlborg wrote:
> On 2018-04-17 10:55, Mike Franklin wrote:
>
>> IMO, however, all of this dependency and C (C runtime, C 
>> standard library, C compiler, etc...) is all superficial.  
>> With a little more due diligence in the compiler and runtime 
>> implementations, none of it would be necessary.
>
> I agree. That's one case where Go shines. It makes 
> cross-compiling so much simpler.

I don't see a huge problem for the compiler (except for quite a 
bunch of LLVM 'intrinsics' boiling down to a C function call, so 
LLVM expects some core C libs to be linked in as well - so these 
C symbols would need to be provided by a D lib).

Basing druntime on the C runtime layer, abstracting away many OS 
differences, makes things considerably simpler though; with the 
current manpower, I see no way to get rid of it and re-implement 
everything in D, while still supporting all platforms (and new 
platforms to come with as little hassle as possible). OTOH, 
libunwind (or for MSVC, the Visual C++ EH personality function 
used by LDC), libpthread, the math functions (which I'd really 
like to see all in pure D), I/O, memory management...

Considering that we'll be stuck with core.stdc anyway, getting 
rid of the C dependencies won't be feasible for a very long time 
IMO. A cross-compiler with integrated cross-linking ability (and 
a tool to cross-compile druntime and Phobos), shipping with 
ready-made C libs and a preconfigured config file in a Docker 
image, working just out of the box should be a great experience 
for the user (and the Docker image generation easily automatable 
for us devs). I've never used Go, so how can that experience be 
further improved?



More information about the digitalmars-d-ldc mailing list