[dub] Passing --DRT-gcopt to dmd

Andre Pany andre at s-e-a-p.de
Fri May 31 13:49:16 UTC 2019


On Friday, 31 May 2019 at 10:47:20 UTC, Mike Parker wrote:
> On Friday, 31 May 2019 at 10:27:44 UTC, Anonymouse wrote:
>
>> What is the correct way?
>
> --DRT flags are for run time, not compile time. They're 
> intended to be passed to your executable and not the compiler. 
> From the docs [1]:
>
> "By default, GC options can only be passed on the command line 
> of the program to run"
>
> With dub, anything following a solitary -- on the command line 
> will be passed to the application [2], so you probably want 
> something like this:
>
> dub test -- --DRT-gcopt=profile:1
>
> [1] https://dlang.org/spec/garbage.html#gc_config
> [2] https://dub.pm/commandline

This might be eaten by the runtime of dub and not the application.

Kind regards
Andre


More information about the Digitalmars-d-learn mailing list