Using D's precise GC when running an app with DUB
Eugene Wissner
belka at caraus.de
Thu May 23 15:40:34 UTC 2019
On Thursday, 23 May 2019 at 14:50:12 UTC, Per Nordlöw wrote:
> How do I specify a druntime flag such as
>
> --DRT-gcopt=gc:precise
>
> when running with dub as
>
> dub run --compiler=dmd --build=unittest
>
> ?
>
> The precise GC flag was introduced in verison 2.085.0
>
> See:
> - https://dlang.org/changelog/2.085.0.html#gc_precise
> - https://dlang.org/spec/garbage.html#precise_gc
You can put into the source:
extern(C) __gshared string[] rt_options = [
"gcopt=gc:precise"
];
you can wrap it into some "version ()" and set the version in the
dub configuration.
More information about the Digitalmars-d-learn
mailing list