Module cranelift_codegen::settings [−][src]
Shared settings module.
This module defines data structures to access the settings defined in the meta language.
Each settings group is translated to a Flags struct either in this module or in its
ISA-specific settings module. The struct provides individual getter methods for all of the
settings as well as computed predicate flags.
The Flags struct is immutable once it has been created. A Builder instance is used to
create it.
Example
use cranelift_codegen::settings::{self, Configurable}; let mut b = settings::builder(); b.set("opt_level", "speed_and_size"); let f = settings::Flags::new(b); assert_eq!(f.opt_level(), settings::OptLevel::SpeedAndSize);
Modules
| detail | Implementation details for generated code. |
Structs
| Builder | Collect settings values based on a template. |
| Flags | Flags group |
| FlagsOrIsa | Wrapper containing flags and optionally a |
| PredicateView | A reference to just the boolean predicates of a settings object. |
Enums
| LibcallCallConv | Values for |
| OptLevel | Values for |
| Regalloc | Values for |
| SetError | An error produced when changing a setting. |
| TlsModel | Values for |
Traits
| Configurable | A string-based configurator for settings groups. |
Functions
| builder | Create a |
Type Definitions
| SetResult | A result returned when changing a setting. |