[dub] Passing --DRT-gcopt to dmd
Mathias Lang
pro.mathias.lang at gmail.com
Mon Feb 3 18:09:12 UTC 2020
On Friday, 31 May 2019 at 15:41:24 UTC, Anonymouse wrote:
> On Friday, 31 May 2019 at 15:31:13 UTC, kinke wrote:
>> On Friday, 31 May 2019 at 10:27:44 UTC, Anonymouse wrote:
>>>> $ grep dflags dub.json
>>>> "dflags": [ "-lowmem", "--DRT-gcopt=profile:1" ],
>>
>> This should work indeed. I guess it doesn't because dub
>> probably uses a response file containing all cmdline options,
>> whereas -lowmem definitely [and --DRT-* probably] need to be
>> direct cmdline args.
>
> Is this something I can/should report? (Where do dub issues go?)
Replying here despite the delay because this is one of the top
post when one google for gcopts.
This will be possible with the new version of the runtime
(>=2.091.0, not released yet).
It has been filled as
https://issues.dlang.org/show_bug.cgi?id=20459 and was fixed in
https://github.com/dlang/druntime/pull/2881 which means dub
compiled with druntime >= 2.091 will allow you to do:
`dub -- --DRT-gcopt=profile:1`
And any other D program will ignore `--DRT` options if provided
after the `--` delimiter.
More information about the Digitalmars-d-learn
mailing list