#[non_exhaustive]pub struct Options {Show 15 fields
pub target: Triple,
pub opt_level: OptLevel,
pub emit: EmitKind,
pub debug_info: bool,
pub warnings_are_errors: bool,
pub error_limit: u32,
pub std: Std,
pub gnu_extensions: bool,
pub gnuc: GnucVersion,
pub hosted: bool,
pub defines: Vec<String>,
pub undefines: Vec<String>,
pub search: SearchPath,
pub line_markers: bool,
pub dumps: Dumps,
}Expand description
Everything a compilation was asked to do.
Options are a plain value with no interior mutability, so a caller can build one, clone
it, tweak one field and run a second compilation, which is exactly what the differential
testing in spec/15-testing.md needs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: TripleThe target to generate code for.
opt_level: OptLevelThe optimisation level.
emit: EmitKindWhat to produce.
debug_info: boolWhether to emit debug information.
warnings_are_errors: boolWhether warnings are errors.
error_limit: u32How many diagnostics to print before giving up. Past a certain point the output is noise from a single earlier mistake, and GCC’s default of no limit is not a kindness.
std: StdThe dialect, from -std=.
gnu_extensions: boolWhether the GNU extensions are on, which is -std=gnu23 rather than -std=c23.
gnuc: GnucVersionThe GCC release claimed, from -fgnuc-version=.
hosted: boolWhether there is a standard library, which is -ffreestanding turned around.
defines: Vec<String>-D in command line order. FOO means FOO=1, as GCC has it.
undefines: Vec<String>-U in command line order, applied after the defines because -U wins.
search: SearchPathWhere a header is looked for.
line_markers: boolWhether -E writes line markers, which -P turns off.
dumps: DumpsWhat the -d family asks for.