bootstrap::core::config::flags

Struct Flags

Source
pub struct Flags {
Show 35 fields pub cmd: Subcommand, pub verbose: u8, pub incremental: bool, pub config: Option<PathBuf>, pub build_dir: Option<PathBuf>, pub build: Option<String>, pub host: Option<TargetSelectionList>, pub target: Option<TargetSelectionList>, pub exclude: Vec<PathBuf>, pub skip: Vec<PathBuf>, pub include_default_paths: bool, pub rustc_error_format: Option<String>, pub on_fail: Option<String>, pub dry_run: bool, pub dump_bootstrap_shims: bool, pub stage: Option<u32>, pub keep_stage: Vec<u32>, pub keep_stage_std: Vec<u32>, pub src: Option<PathBuf>, pub jobs: Option<u32>, pub warnings: Warnings, pub error_format: Option<String>, pub json_output: bool, pub color: Color, pub bypass_bootstrap_lock: bool, pub rust_profile_generate: Option<String>, pub rust_profile_use: Option<String>, pub llvm_profile_use: Option<String>, pub llvm_profile_generate: bool, pub enable_bolt_settings: bool, pub skip_stage0_validation: bool, pub reproducible_artifact: Vec<String>, pub paths: Vec<PathBuf>, pub set: Vec<String>, pub free_args: Vec<String>,
}
Expand description

Deserialized version of all flags for this compile.

Fields§

§cmd: Subcommand§verbose: u8

use verbose output (-vv for very verbose)

§incremental: bool

use incremental compilation

§config: Option<PathBuf>

TOML configuration file for build

§build_dir: Option<PathBuf>

Build directory, overrides build.build-dir in config.toml

§build: Option<String>

build target of the stage0 compiler

§host: Option<TargetSelectionList>

host targets to build

§target: Option<TargetSelectionList>

target targets to build

§exclude: Vec<PathBuf>

build paths to exclude

§skip: Vec<PathBuf>

build paths to skip

§include_default_paths: bool

include default paths in addition to the provided ones

§rustc_error_format: Option<String>§on_fail: Option<String>

command to run on failure

§dry_run: bool

dry run; don’t build anything

§dump_bootstrap_shims: bool

Indicates whether to dump the work done from bootstrap shims

§stage: Option<u32>

stage to build (indicates compiler to use/test, e.g., stage 0 uses the bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)

§keep_stage: Vec<u32>

stage(s) to keep without recompiling (pass multiple times to keep e.g., both stages 0 and 1)

§keep_stage_std: Vec<u32>

stage(s) of the standard library to keep without recompiling (pass multiple times to keep e.g., both stages 0 and 1)

§src: Option<PathBuf>

path to the root of the rust checkout

§jobs: Option<u32>

number of jobs to run in parallel

§warnings: Warnings

if value is deny, will deny warnings if value is warn, will emit warnings otherwise, use the default configured behaviour

§error_format: Option<String>

rustc error format

§json_output: bool

use message-format=json

§color: Color

whether to use color in cargo and rustc output

§bypass_bootstrap_lock: bool

Bootstrap uses this value to decide whether it should bypass locking the build process. This is rarely needed (e.g., compiling the std library for different targets in parallel).

Unless you know exactly what you are doing, you probably don’t need this.

§rust_profile_generate: Option<String>

generate PGO profile with rustc build

§rust_profile_use: Option<String>

use PGO profile for rustc build

§llvm_profile_use: Option<String>

use PGO profile for LLVM build

§llvm_profile_generate: bool

generate PGO profile with llvm built for rustc

§enable_bolt_settings: bool

Enable BOLT link flags

§skip_stage0_validation: bool

Skip stage0 compiler validation

§reproducible_artifact: Vec<String>

Additional reproducible artifacts that should be added to the reproducible artifacts archive.

§paths: Vec<PathBuf>

paths for the subcommand

§set: Vec<String>

override options in config.toml

§free_args: Vec<String>

arguments passed to subcommands

Implementations§

Source§

impl Flags

Source

pub fn try_parse_verbose_help(args: &[String]) -> bool

Check if <cmd> -h -v was passed. If yes, print the available paths and return true.

Source

pub fn parse(args: &[String]) -> Self

Trait Implementations§

Source§

impl Args for Flags

Source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

impl CommandFactory for Flags

Source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
Source§

impl Debug for Flags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Flags

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Flags

§

fn parse() -> Self

Parse from std::env::args_os(), [exit][Error::exit] on error.
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, [exit][Error::exit] on error.
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, [exit][Error::exit] on error. Read more
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Flags

§

impl RefUnwindSafe for Flags

§

impl Send for Flags

§

impl Sync for Flags

§

impl Unpin for Flags

§

impl UnwindSafe for Flags

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 664 bytes