is it posible to compile individual module separately?

evilrat evilrat666 at gmail.com
Tue Feb 16 17:06:21 UTC 2021


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" ],

then build normally, if you have gdc or ldc dub might pick first 
compiler in %PATH%, compiler can be selected with --compiler 
option

    dub build --compiler=dmd


More information about the Digitalmars-d-learn mailing list