Skip to content

Remove env_var: and command_line: from Options #1237

Closed
@wks

Description

@wks

We used to have some items in mmtk::util::options::Options that can only be set via environment variables but not the command line, or vice versa. One example is MMTK_THREADS due to MMTk being initialized via lazy_static!. After we introduced MMTKBuilder, this restriction is removed.

Now all options can be set via both environment variables and command line. We may remove the redundant [env_var: true, command_line: true] from the options declaration. e.g. What we have now

    plan:                  PlanSelector         [env_var: true, command_line: true] [always_valid] = PlanSelector::GenImmix,
    threads:               usize                [env_var: true, command_line: true] [|v: &usize| *v > 0]    = num_cpus::get(),

will become

    plan:                  PlanSelector         [always_valid] = PlanSelector::GenImmix,
    threads:               usize                [|v: &usize| *v > 0]    = num_cpus::get(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions