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.

Reply via email to