dmd out of memory compiling vibed project

Guillaume guillaume at spam.spam
Thu May 23 00:26:03 UTC 2019


On Wednesday, 22 May 2019 at 22:07:41 UTC, Francesco Mecca wrote:
> On Wednesday, 22 May 2019 at 12:49:56 UTC, Guillaume wrote:
>> Hi,
>>
>> I'm using dmd 2.086.0 and vibe.d 0.85.0 to compile a vibe.d 
>> project with ~20 views (*.dt). On my main computer, I have no 
>> problems but my laptop has only 4 gig of RAM and dmd is killed 
>> before the end of the compilation because it takes more than 4 
>> gig of RAM.
>>
>> I've tried the new -lowmem switch (in DFLAGS in dmd.conf) but 
>> it doesn't change anything. It does work with the "singleFile" 
>> option with dub but it's really long to compile... And the 
>> "singleFile" option seems to recompile everything even if I 
>> only change one ".d" source file.
>>
>> Are there other solutions?
>>
>> Thanks,
>>
>> Guillaume
>
> Do you have the same problem with ldc or gdc?
> I have a pc with 4 GB as well and dmd is usually the only one 
> that gets OOM killed when compiling big projects.

Yep. I've tryed the latest ldc and gdc and both cashes... 
Although I don't know how to add a "-lowmem" switch to those 
compiler... but I suspect it would not change anything.

If dub "singleFile" could be more intelligent and not recompile 
everything it would solve my problem!

Guillaume



More information about the Digitalmars-d mailing list