D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18120 - Document setting DRT options via the environment
Summary: Document setting DRT options via the environment
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
: 19951 (view as issue list)
Depends on:
Blocks:
 
Reported: 2017-12-24 19:42 UTC by Seb
Modified: 2024-12-15 15:24 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2017-12-24 19:42:59 UTC
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 Rainer Schuetze 2017-12-25 10:45:10 UTC
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 Steven Schveighoffer 2017-12-30 14:26:53 UTC
so close this?
Comment 3 Seb 2017-12-30 17:08:26 UTC
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 Steven Schveighoffer 2017-12-30 18:05:16 UTC
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 berni44 2019-12-30 13:12:44 UTC
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 Steven Schveighoffer 2019-12-30 15:13:55 UTC
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 berni44 2020-01-26 19:30:02 UTC
*** Issue 19951 has been marked as a duplicate of this issue. ***
Comment 8 dlangBugzillaToGithub 2024-12-15 15:24:37 UTC
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