Potential of a compiler that creates the executable at once
rempas
rempas at tutanota.com
Fri Feb 11 12:34:21 UTC 2022
On Thursday, 10 February 2022 at 20:39:33 UTC, Walter Bright
wrote:
> This is actually the reason behind why dmd will create a single
> object file when given multiple source files on the command
> line. It's also why dmd can create a library directly.
>
> I've toyed with the idea of generating an executable directly
> many times.
That's nice to hear! However, does DMD generates object files
directly or "asm" files that are passed to a C compile? If I
remember correctly, LDC2 needs to pass the output to a C compiler
as people told me so what's the case from DMD?
I tried to compile a C library (code converted in D to use with
DMD rather than using "ImportC") using GCC and DMD. And it turns
out that DMD is about 70-80% faster than GCC which is good but I
would suppose it could have been better given the design of the D
as a language and if DMD outputs object files directly.
Do you think that there are any very bad places in DMD's backend?
Has anyone in the team thought about re-writing the backend (or
parts of it) from the beginning?
More information about the Digitalmars-d
mailing list