digitalmars.D.learn - Using D's precise GC when running an app with DUB
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (9/9) May 23 2019 How do I specify a druntime flag such as
- rikki cattermole (2/9) May 23 2019 dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (3/5) May 23 2019 Thanks!
- rikki cattermole (3/9) May 23 2019 No can do. There is meant to be a way to set it in D however.
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (4/7) May 23 2019 Should be as easy as
- rikki cattermole (2/13) May 23 2019 That would be passed to dmd, not to the build executable upon running.
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (5/12) May 23 2019 You mean wise versa, right?
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (4/5) May 24 2019 Nevermind that comment. No "wise versa". You're answer is
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (6/8) May 23 2019 Hmm, the flag doesn't propagate to dmd when compiling in verbose
- rikki cattermole (4/13) May 23 2019 No. You told dub to -v.
- Eugene Wissner (7/16) May 23 2019 You can put into the source:
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
May 23 2019
On 24/05/2019 2:50 AM, 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=unittestdub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise
May 23 2019
On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote:dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:preciseThanks! And if I want to set this in a dub.sdl?
May 23 2019
On 24/05/2019 2:58 AM, Per Nordlöw wrote:On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote:No can do. There is meant to be a way to set it in D however. But I have heard mixed results (not that I've tried it).dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:preciseThanks! And if I want to set this in a dub.sdl?
May 23 2019
On Thursday, 23 May 2019 at 15:02:12 UTC, rikki cattermole wrote:Should be as easy as dflags "--DRT-gcopt=gc:precise" right?And if I want to set this in a dub.sdl?No can do. There is meant to be a way to set it in D however. But I have heard mixed results (not that I've tried it).
May 23 2019
On 24/05/2019 3:03 AM, Per Nordlöw wrote:On Thursday, 23 May 2019 at 15:02:12 UTC, rikki cattermole wrote:That would be passed to dmd, not to the build executable upon running.Should be as easy as dflags "--DRT-gcopt=gc:precise" right?And if I want to set this in a dub.sdl?No can do. There is meant to be a way to set it in D however. But I have heard mixed results (not that I've tried it).
May 23 2019
On Thursday, 23 May 2019 at 15:05:15 UTC, rikki cattermole wrote:You mean wise versa, right? Now I understand, --DRT-gcopt=gc:precise is passed to the resulting binary...Should be as easy as dflags "--DRT-gcopt=gc:precise" right?That would be passed to dmd, not to the build executable upon running.
May 23 2019
On Thursday, 23 May 2019 at 15:25:31 UTC, Per Nordlöw wrote:You mean wise versa, right?Nevermind that comment. No "wise versa". You're answer is correct, rikki cattermole. Thanks
May 24 2019
On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote:dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:preciseHmm, the flag doesn't propagate to dmd when compiling in verbose mode via -v as dub run -v --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Shouldn't it?
May 23 2019
On 24/05/2019 3:01 AM, Per Nordlöw wrote:On Thursday, 23 May 2019 at 14:51:41 UTC, rikki cattermole wrote:No. You told dub to -v. DFLAGS="-v" dub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precisedub run --compiler=dmd --build=unittest -- --DRT-gcopt=gc:preciseHmm, the flag doesn't propagate to dmd when compiling in verbose mode via -v as dub run -v --compiler=dmd --build=unittest -- --DRT-gcopt=gc:precise Shouldn't it?
May 23 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_gcYou 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.
May 23 2019