Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document setting DRT options via the environment #4077

Open
dlangBugzillaToGithub opened this issue Dec 24, 2017 · 7 comments
Open

Document setting DRT options via the environment #4077

dlangBugzillaToGithub opened this issue Dec 24, 2017 · 7 comments

Comments

@dlangBugzillaToGithub
Copy link

Seb reported this on 2017-12-24T19:42:59Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=18120

CC List

Description

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.
@dlangBugzillaToGithub
Copy link
Author

r.sagitario commented on 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.

@dlangBugzillaToGithub
Copy link
Author

schveiguy (@schveiguy) commented on 2017-12-30T14:26:53Z

so close this?

@dlangBugzillaToGithub
Copy link
Author

greeenify commented on 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.

@dlangBugzillaToGithub
Copy link
Author

schveiguy (@schveiguy) commented on 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.

@dlangBugzillaToGithub
Copy link
Author

bugzilla (@WalterBright) commented on 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

@dlangBugzillaToGithub
Copy link
Author

schveiguy (@schveiguy) commented on 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.

@dlangBugzillaToGithub
Copy link
Author

bugzilla (@WalterBright) commented on 2020-01-26T19:30:02Z

*** Issue 19951 has been marked as a duplicate of this issue. ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant