DMD as cross-compiler
Jacob Carlborg
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 [1].
>> 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 [2].
[1]
https://github.com/d-cross-compiler/sdk-apple/releases/tag/v0.0.1
[2]
https://github.com/d-cross-compiler/cctools-port/releases/tag/cctools-949.0.1-ld64-530
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list