Bug 18120 – Document setting DRT options via the environment

Status
NEW
Severity
enhancement
Priority
P4
Component
dlang.org
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2017-12-24T19:42:59Z
Last change time
2024-12-15T15:24:37Z
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dlang.org#4077 →

Comments

Comment #0 by greeenify — 2017-12-24T19:42:59Z
From https://github.com/ldc-developers/ldc/pull/1672#issuecomment-353788172 > For some use cases where it is not possible to add commandline flags to the executable (e.g. in scripts that one can't/shouldn't change), it'd be nice to be able to set the configuration through other means, e.g. built-in like in this PR, or probably better: through an ENV variable. ASan uses an ENV var, which is quite nice. So perhaps an idea to be able to set DRT options through an ENV variable aswell.
Comment #1 by r.sagitario — 2017-12-25T10:45:10Z
If grabbed via rt_configOption, the DRT options are read from the environment variable "DRT_<OPT>" if rt_envvars_enabled is set in the binary. See https://dlang.org/spec/garbage.html#gc_config for an example.
Comment #2 by schveiguy — 2017-12-30T14:26:53Z
so close this?
Comment #3 by greeenify — 2017-12-30T17:08:26Z
Let's keep this open and change the purpose? Improving the documentation? For example, we could add a dedicated page about druntime's option to the spec.
Comment #4 by schveiguy — 2017-12-30T18:05:16Z
Great idea! We actually I think should summarize in a nice document all the ways you can customize druntime, command line, environment, and in the binary.
Comment #5 by bugzilla — 2019-12-30T13:12:44Z
I recently found a start in rt.config. But I'm not sure, if that's complete: https://dlang.org/phobos/rt_config.html
Comment #6 by schveiguy — 2019-12-30T15:13:55Z
I think that's the wrong place to document. They should be documented elsewhere (but the document should be linked), because the options are scattered all over the place (GC, cycle detection, unittest, etc.). One document to show how to USE the DRT options should be a nice top-level article.
Comment #7 by bugzilla — 2020-01-26T19:30:02Z
*** Issue 19951 has been marked as a duplicate of this issue. ***
Comment #8 by robert.schadek — 2024-12-15T15:24:37Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/4077 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB