[GSoC] Header Generation for C/C++

Eduard Staniloiu edi33416 at gmail.com
Wed Jul 17 15:59:10 UTC 2019


On Wednesday, 17 July 2019 at 14:26:11 UTC, Iain Buclaw wrote:
> On Wed, 17 Jul 2019 at 15:50, Seb via Digitalmars-d 
> <digitalmars-d at puremagic.com> wrote:
>>
>> On Wednesday, 17 July 2019 at 13:35:35 UTC, Iain Buclaw wrote:
>> >
>> > But apart from the construction (and possible destruction) 
>> > of all frontend types, there shouldn't be anything 
>> > duplicated.
>> >
>> > Did you consider cross compiler generation?
>>
>> Motivations for doing it inside DMD instead of a separate 
>> library:
>>
>> - DMD frontend isn't stable (AST nodes are often changed)
>> - DMD frontend isn't SemVer-tagged (so you can only rely on
>> ~master)
>> - people expressed a lot of interest in this being integrated
>> directly
>> - easier bootstrapping (though not really a concern if we 
>> require
>> the generated headers to be checked into the dmd repository)
>
> It doesn't make bootstrapping easier, as you will be starting 
> from a
> base where either:
> 1. There is no D compiler
> 2. The D compiler does not understand -HC
>
> Having a standalone application means you only need to worry 
> about (1) in order to be able to generate headers to then build 
> the D compiler.

Maybe I'm missing something, but wouldn't the bootstrapping stay 
the same?
You start from (1) - no D compiler, you bootstrap the D compiler, 
and then you get `-HC`, right?

With the tool approach, you're still at (1), you bootstrap the D 
compiler and then build the tool with the bootstrapped D compiler.

Am I missing something?


More information about the Digitalmars-d mailing list