[gsoc] DMD - Ideas

Bastiaan Veelo Bastiaan at Veelo.net
Tue Mar 19 22:30:20 UTC 2019


On Tuesday, 19 March 2019 at 20:45:06 UTC, H. S. Teoh wrote:
> On Tue, Mar 19, 2019 at 09:07:23PM +0100, Jacob Carlborg via 
> Digitalmars-d wrote:
>> On 2019-03-19 18:01, H. S. Teoh wrote:
>> 
>> > 2) Won't there be bootstrapping issues to consider, if 
>> > building dmd requires build.d, but build.d needs to be 
>> > compiled with dmd?
>> 
>> Basically the whole compiler is written in D now. 
>> Bootstrapping is done by using a pre-compiled binary. For new 
>> targets cross-compiling is supposed to be used.
> [...]
>
> Precisely my point.  So now instead of a single precompiled 
> binary
> (dmd), you have two (dmd + build). When the two go out of sync, 
> things
> become "interesting".

Is that a realistic concern? Say build suddenly lags 10 releases 
behind dmd. For that to happen, build.d would have to remain 
unchanged for that long.
Anyway, build.d could embed the version of the compiler with 
which it was built into itself, and check that against the 
version of the compiler that it calls for building. When they 
mismatch, it could rebuild itself (or print a warning).




More information about the Digitalmars-d mailing list