is it posible to compile individual module separately?
Anonymouse
zorael at gmail.com
Tue Feb 16 17:15:25 UTC 2021
On Tuesday, 16 February 2021 at 17:06:21 UTC, evilrat wrote:
> On Tuesday, 16 February 2021 at 07:01:53 UTC, bokuno_D wrote:
>> i run "dub build" on it. but OOM kill the compiler.
>> -
>> is there a way to reduce memory consumtion of the compiler?
>> or maybe third party tool? alternative to dub?
>
> Assuming you are using DMD, there is -lowmem switch to enable
> garbage collection (it is off by default for faster builds)
>
> open dub.json, add dflags array with -lowmem, something like
> this line:
>
> "dflags": [ "-lowmem" ],
Ideally this would work, but
https://issues.dlang.org/show_bug.cgi?id=20699. Does work with
ldc though.
You can also use dub build --build-mode=singleFile, and it will
compile one file at a time. It'll be slow but slow is better than
OOM.
More information about the Digitalmars-d-learn
mailing list