Potential of a compiler that creates the executable at once

rempas rempas at tutanota.com
Fri Feb 11 19:57:15 UTC 2022


On Friday, 11 February 2022 at 16:40:42 UTC, Dennis wrote:
>
> DMD goes from its own backend block tree to an object file, 
> without writing assembly. In fact, only recently was the 
> ability to output asm added for debugging purposes:
> https://dlang.org/blog/2022/01/24/the-binary-language-of-moisture-vaporators/
>
> On Linux dmd invokes gcc by default to create an executable, 
> but only to link the resulting object files, not to compile 
> C/assembly code.
>
> LDC goes from LLVM IR to machine code, but it can output 
> assembly with the `-output-s` flag.
>
> GDC does generate assembly text to the tmp folder and then 
> invokes `gas` the GNU assembler, it can't directly write 
> machine code.

Thank you! This sums it up perfectly! Can you choose to pass it 
directly to the linker with DMD on Linux? Something like setting 
"ld" (or another linker of course) as the "C" compiler, idk...


More information about the Digitalmars-d mailing list