Configuration options for druntime.
The default way to configure the runtime is by passing command line arguments starting with --DRT-
and followed by the option name, e.g. --DRT-gcopt
to configure the GC. When command line parsing is enabled, command line options starting with --DRT-
are filtered out before calling main, so the program will not see them. They are still available via rt_args()
.
Configuration via the command line can be disabled by declaring a variable for the linker to pick up before using it's default from the runtime:
extern(C) __gshared bool rt_cmdline_enabled = false;
DRT_
followed by the option name, e.g. DRT_GCOPT
: extern(C) __gshared bool rt_envvars_enabled = true;
rt_options
: extern(C) __gshared string[] rt_options = [ "gcopt=precise:1 profile:1"];
rt_options
, then environment variables, then command line arguments, i.e. if command line arguments are not disabled, they can override options specified through the environment or embedded in the executable. get a druntime config option using standard configuration options opt name of the option to retrieve dg if non-null, passes the option through this delegate and only returns its return value if non-null reverse reverse the default processing order cmdline/envvar/rt_options to allow overwriting settings in the delegate with values from higher priority
returns the options' value if - set on the command line as "--DRT-
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/rt_config.html