Add ImportC compiler to dmd

Walter Bright newshound2 at digitalmars.com
Thu May 13 01:37:55 UTC 2021


On 5/12/2021 4:24 AM, Iain Buclaw wrote:
> Integration is another matter though, as all GCC compilers know about all 
> languages that have been enabled, and what file extensions they handle.  i.e: 
> `gdc foo.c bar.d baz.go` will invoke the C, D and Go compilers separately in one 
> execution step:
> ```
> cpp foo.c -o foo.i;
> cc1 foo.i -o foo.o;
> d21 bar.d -o bar.o;
> go1 baz.go -o baz.o;
> ld foo.o bar.o baz.o -o a.out
> ```

I don't see any conflict there, either. While

     dmd foo.c

will compile C and generate an executable, so will

     gdc foo.c

It'll just use a different C compiler.


More information about the Digitalmars-d mailing list