DMD as cross-compiler
doob at me.com
Thu Nov 12 19:15:28 UTC 2020
On Thursday, 12 November 2020 at 18:58:56 UTC, Elronnd wrote:
> FWIW I started working on some stubs for a pure-d libc a while
> back - https://github.com/moon-chilled/dlibc/. If it were
> completed and integrated into druntime--or, at least, if enough
> of it were completed to support druntime+phobos--then it would
> make for a much nicer cross-compiling experience.
That's nice. But I would prefer if druntime and Phobos did not
depend on the C standard library, even if it's implemented in D.
You're constrained by C and by the API of the C standard library.
Implementing druntime and Phobos without the C standard library
will give a big opportunity to do things better.
> Perhaps a better solution would be to link to a stub dylib of
> libc? (Assuming macos libc has a stable ABI.)
That's already what I'm working on .
>> LLD for Mach-O has bitrotted significantly and isn't really
>> functional anymore (beyond the most basic programs). I'd
>> recommend sticking with ld64 as the linker.
Same here, working on that as well .
More information about the Digitalmars-d