Porting D to custom OS
IGotD-
nise at nise.com
Sat Feb 22 19:30:25 UTC 2020
On Saturday, 22 February 2020 at 15:18:09 UTC, kinke wrote:
>
> I'd suggest to first hack the compiler, so that it doesn't
> predefine the host OS, but a new version for your OS (and check
> whether predefining `version (Posix)` is appropriate or not).
> That way, you'll hit static asserts when compiling
> druntime/Phobos, where OS-specific parts don't handle the new
> OS yet. Once all compile errors are fixed, you can then move on
> to compiling and linking the druntime/Phobos test runners,
> fixing all linker errors along the way, and finally fixing all
> failing unittests, possibly requiring compiler codegen
> adaptations.
That's sound like a start. Is there some kind of automation
behind this based on the target triple (-mtriple) or just some
kind of hardcoded default versions identifiers somewhere in the
source code?
More information about the Digitalmars-d-learn
mailing list