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.
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