How do people feel about putting source compiler directives inside rdmd?

Seb seb at wilzba.ch
Fri Dec 6 10:59:26 UTC 2019


On Friday, 6 December 2019 at 08:51:03 UTC, mipri wrote:
> On Friday, 6 December 2019 at 07:47:33 UTC, Andre Pany wrote:
>> [...]
>
> It's calling dmd on every run, even with your patch:
>
> 1575620540.004204 execve("/usr/bin/dmd", ["dmd", "-quiet", 
> "-c", "-o-", "-v", "long /tmp filename.d"]
> 1575620540.204598 execve("long tmp filename"
>
> ... but that seems to be probePlatform, which stopWatch says
> only takes 12ms.
>
> Statting the generated file shows that it's not getting touched,
> so it's definitely not getting recompiled.
>
>> [...]
>
> dmd, but a release build with ldc doesn't decrease this overhead
> at all actually.
>
>> [...]
>
> It's still a huge improvement. I'll take another look at
> the remaining overhead over the weekend.

Awesome!
FYI: the platform probe could either be cached or the 
-Xi=compilerInfo -Xf=- info API which has been added in 2.079 for 
this purpose could be used.

Details: https://github.com/dlang/dub/issues/1317


More information about the Digitalmars-d mailing list