dub and -lowmem: does nothing

kinke noone at nowhere.com
Sat Mar 21 00:17:37 UTC 2020

On Friday, 20 March 2020 at 23:37:52 UTC, Anonymouse wrote:
> 4. If I run dub with -v on the lowmem configuration and 
> copy/paste *the same command it ran*, unmodified, I suddenly 
> get the more expected ~1183 Mb used.
> [...]
> -lowmem is visibly present in the dmd command listed with -v, 
> but it seems to do nothing through dub.
> How? Why?

Most likely because dub doesn't actually invoke the listed 
command, but uses a response file to work around cmdline length 
limits. -lowmem in response files is ignored by DMD (needs to be 
parsed and set before druntime initialization, but response file 
parsing needs druntime + GC). It works for LDC though.

More information about the Digitalmars-d-learn mailing list