diff --git a/library/Cargo.toml b/library/Cargo.toml index 788c990c16344..fcc87dde84b16 100644 --- a/library/Cargo.toml +++ b/library/Cargo.toml @@ -2,17 +2,12 @@ cargo-features = ["profile-rustflags"] [workspace] resolver = "1" -members = [ - "std", - "sysroot", - "coretests", - "alloctests", -] +members = ["std", "sysroot", "coretests", "alloctests"] exclude = [ - # stdarch has its own Cargo workspace - "stdarch", - "windows_link" + # stdarch has its own Cargo workspace + "stdarch", + "windows_link", ] [profile.release.package.compiler_builtins] @@ -46,36 +41,111 @@ object.debug = 0 rustc-demangle.debug = 0 rustc-demangle.opt-level = "s" -# panic_abort must always be compiled with panic=abort, even when the rest of the -# sysroot is panic=unwind. -[profile.dev.package.panic_abort] -rustflags = ["-Cpanic=abort"] +# Until CI is moved to using the dist profile (via `--dist-std`), dev and release should copy the +# settings in the dist profile +[profile.dev] +codegen-units = 1 +debug = 1 # "limited" +rustflags = [ + # Same as `profile.dist.rustflags` + "--check-cfg=cfg(feature,values(any()))", + "-Zunstable-options", + "-Cembed-bitcode=yes", + "-Zinline-mir", + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", + "-Cforce-frame-pointers=non-leaf", +] -[profile.release.package.panic_abort] -rustflags = ["-Cpanic=abort"] +[profile.release] +codegen-units = 1 +debug = 1 # "limited" +rustflags = [ + # Same as `profile.dist.rustflags` + "--check-cfg=cfg(feature,values(any()))", + "-Zunstable-options", + "-Cembed-bitcode=yes", + "-Zinline-mir", + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", + "-Cforce-frame-pointers=non-leaf", +] -# The "dist" profile is used by bootstrap for prebuilt libstd artifacts -# These settings ensure that the prebuilt artifacts support a variety of features -# in the user's profile. +# The "dist" profile is used by bootstrap when `--dist-std` is provided, and in the future will be +# used for all prebuilt standard library artifacts. +# These settings ensure that the prebuilt artifacts support a variety of features in the user's +# profile. [profile.dist] inherits = "release" codegen-units = 1 debug = 1 # "limited" rustflags = [ + # `std`, `alloc` and `core` imports some dependencies by #[path] (like + # backtrace, core_simd, std_float, ...), those dependencies have their own + # features but cargo isn't involved in the #[path] process and so cannot pass the + # complete list of features, so for that reason we don't enable checking of + # features for std crates. + "--check-cfg=cfg(feature,values(any()))", + # Sometimes bootstrap sets rustflags with unstable options, so we preemptively pass it + # here just in case. + "-Zunstable-options", # `profile.lto=off` implies `-Cembed-bitcode=no`, but unconditionally embedding # bitcode is necessary for when users enable LTO. # Required until Cargo can re-build the standard library based on the value # of `profile.lto` in the user's profile. "-Cembed-bitcode=yes", + # Always enable inlining MIR when building the standard library. + # Without this flag, MIR inlining is disabled when incremental compilation is enabled. + # That causes some mir-opt tests which inline functions from the standard library to + # break when incremental compilation is enabled. So this overrides the "no inlining + # during incremental builds" heuristic for the standard library. + "-Zinline-mir", + # Similarly, we need to keep debug info for functions inlined into other std functions, + # even if we're not going to output debuginfo for the crate we're currently building, + # so that it'll be available when downstream consumers of std try to use it. + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", # Enable frame pointers + "-Cforce-frame-pointers=non-leaf", +] + +# panic_abort must always be compiled with panic=abort, even when the rest of the +# sysroot is panic=unwind. +[profile.dev.package.panic_abort] +rustflags = [ + "-Cpanic=abort", + # Inherited from `profile.dev.rustflags` + "--check-cfg=cfg(feature,values(any()))", + "-Zunstable-options", + "-Cembed-bitcode=yes", + "-Zinline-mir", + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", + "-Cforce-frame-pointers=non-leaf", +] + +[profile.release.package.panic_abort] +rustflags = [ + "-Cpanic=abort", + # Inherited from `profile.release.rustflags` + "--check-cfg=cfg(feature,values(any()))", + "-Cembed-bitcode=yes", "-Zunstable-options", + "-Zinline-mir", + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", "-Cforce-frame-pointers=non-leaf", ] [profile.dist.package.panic_abort] rustflags = [ "-Cpanic=abort", + # Inherited from `profile.dist.rustflags` "-Cembed-bitcode=yes", + "--check-cfg=cfg(feature,values(any()))", + "-Zinline-mir", + "-Zinline-mir-preserve-debug", + "-Zmir-strip-debuginfo=locals-in-tiny-functions", "-Zunstable-options", "-Cforce-frame-pointers=non-leaf", ] diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index aebd7fee1f231..63636e5cdb7ab 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -541,7 +541,7 @@ pub fn prepare_compiler_for_check( std_rmeta_sysroot = prepare_std(builder, build_compiler, target); build_compiler } - Mode::Std => { + Mode::Std | Mode::DistStd => { // When checking std stage N, we want to do it with the stage N compiler // Note: we don't need to build the host stdlib here, because when compiling std, the // stage 0 stdlib is used to compile build scripts and proc macros. diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index b1157ef381013..8575b109dd0b2 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -243,6 +243,7 @@ impl CommandLineStep for Std { } target_deps.extend(self.copy_extra_objects(builder, &build_compiler, target)); + let mode = if builder.sess.config.cmd.dist_std() { Mode::DistStd } else { Mode::Std }; // We build a sysroot for mir-opt tests using the same trick that Miri does: A check build // with -Zalways-encode-mir. This frees us from the need to have a target linker, and the @@ -252,7 +253,7 @@ impl CommandLineStep for Std { let mut cargo = builder::Cargo::new_for_mir_opt_tests( builder, build_compiler, - Mode::Std, + mode, SourceType::InTree, target, Kind::Check, @@ -265,7 +266,7 @@ impl CommandLineStep for Std { let mut cargo = builder::Cargo::new( builder, build_compiler, - Mode::Std, + mode, SourceType::InTree, target, Kind::Build, @@ -285,7 +286,7 @@ impl CommandLineStep for Std { let _guard = builder.msg( Kind::Build, format_args!("library artifacts{}", crate_description(&self.crates)), - Mode::Std, + mode, build_compiler, target, ); diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 47318d3c086f5..44f7e8b41fd82 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -3385,7 +3385,7 @@ fn run_cargo_test<'a>( ) -> bool { let compiler = cargo.compiler(); let stage = match cargo.mode() { - Mode::Std => compiler.stage, + Mode::Std | Mode::DistStd => compiler.stage, _ => compiler.stage + 1, }; @@ -3519,7 +3519,8 @@ impl CommandLineStep for Crate { .map(|p| builder.crate_paths[&p.assert_single_path().path].clone()) .collect(); - builder.ensure(Crate { build_compiler, target: run.target, mode: Mode::Std, crates }); + let mode = if builder.sess.config.cmd.dist_std() { Mode::DistStd } else { Mode::Std }; + builder.ensure(Crate { build_compiler, target: run.target, mode, crates }); } /// Runs all unit tests plus documentation tests for a given crate defined @@ -3603,7 +3604,7 @@ impl CommandLineStep for Crate { }; match mode { - Mode::Std => { + Mode::Std | Mode::DistStd => { if builder.kind == Kind::Miri { // We can't use `std_cargo` as that uses `optimized-compiler-builtins` which // needs host tools for the given target. This is similar to what `compile::Std` diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 754f4a547bd74..ae69567709a67 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -718,6 +718,10 @@ impl Builder<'_> { build_stamp::clear_if_dirty(self, &out_dir, &backend); } + if mode != Mode::DistStd { + self.apply_profile_settings(&mut cargo, mode); + } + if self.config.cmd.timings() { cargo.arg("--timings"); } @@ -728,7 +732,7 @@ impl Builder<'_> { Mode::Rustc | Mode::ToolRustcPrivate | Mode::ToolBootstrap | Mode::ToolTarget => { self.compiler_doc_out(target) } - Mode::Std => { + Mode::Std | Mode::DistStd => { if self.config.cmd.json() { out_dir.join(target).join("json-doc") } else { @@ -741,8 +745,6 @@ impl Builder<'_> { build_stamp::clear_if_dirty(self, &my_out, &rustdoc); } - let profile_var = |name: &str| cargo_profile_var(name, &self.config, mode); - // See comment in rustc_llvm/build.rs for why this is necessary, largely llvm-config // needs to not accidentally link to libLLVM in stage0/lib. cargo.env("REAL_LIBRARY_PATH_VAR", helpers::dylib_path_var()); @@ -831,23 +833,15 @@ impl Builder<'_> { rustflags.arg("-Zrandomize-layout"); } - // Enable compile-time checking of `cfg` names, values and Cargo `features`. - // - // Note: `std`, `alloc` and `core` imports some dependencies by #[path] (like - // backtrace, core_simd, std_float, ...), those dependencies have their own - // features but cargo isn't involved in the #[path] process and so cannot pass the - // complete list of features, so for that reason we don't enable checking of - // features for std crates. - if mode == Mode::Std { - rustflags.arg("--check-cfg=cfg(feature,values(any()))"); - } - // Add extra cfg not defined in/by rustc // - // Note: Although it would seems that "-Zunstable-options" to `rustflags` is useless as - // cargo would implicitly add it, it was discover that sometimes bootstrap only use - // `rustflags` without `cargo` making it required. - rustflags.arg("-Zunstable-options"); + // Note: Although it would seem that "-Zunstable-options" to `rustflags` is useless as + // cargo would implicitly add it, it was discovered that sometimes bootstrap uses + // `rustflags` that require it without `cargo` requiring it. + // The library profile sets this for std. + if !mode.is_std() { + rustflags.arg("-Zunstable-options"); + } // Add parallel frontend threads configuration if let Some(threads) = self.config.rust_parallel_frontend_threads { @@ -882,7 +876,7 @@ impl Builder<'_> { let mut rustdocflags = rustflags.clone(); match mode { - Mode::Std | Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolTarget => {} + Mode::Std | Mode::DistStd | Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolTarget => {} Mode::Rustc | Mode::Codegen | Mode::ToolRustcPrivate => { // Build proc macros both for the host and the target unless proc-macros are not // supported by the target. @@ -946,7 +940,9 @@ impl Builder<'_> { "binary-dep-depinfo,proc_macro_span,proc_macro_span_shrink,proc_macro_diagnostic" .to_string() } - Mode::Std | Mode::Rustc | Mode::Codegen | Mode::ToolRustcPrivate => String::new(), + Mode::Std | Mode::DistStd | Mode::Rustc | Mode::Codegen | Mode::ToolRustcPrivate => { + String::new() + } }; cargo.arg("-j").arg(self.jobs().to_string()); @@ -983,6 +979,7 @@ impl Builder<'_> { // things still build right, please do! match mode { Mode::Std => metadata.push_str("std"), + Mode::DistStd => metadata.push_str("diststd"), // When we're building rustc tools, they're built with a search path // that contains things built during the rustc build. For example, // bitflags is built during the rustc build, and is a dependency of @@ -1020,7 +1017,7 @@ impl Builder<'_> { // // Only clear out the directory if we're running Cargo on std; otherwise, we // should let Cargo take care of things for us (via depdep info) - if !self.config.dry_run() && mode == Mode::Std { + if !self.config.dry_run() && mode.is_std() { build_stamp::clear_if_dirty(self, &out_dir, &self.rustc(compiler)); } @@ -1074,43 +1071,10 @@ impl Builder<'_> { cargo.env("MIRI_HOST_SYSROOT", &host_sysroot); } - cargo.env(profile_var("STRIP"), self.config.rust_strip.to_string()); - if let Some(stack_protector) = &self.config.rust_stack_protector { rustflags.arg(&format!("-Zstack-protector={stack_protector}")); } - let debuginfo_level = match mode { - Mode::Rustc | Mode::Codegen => self.config.rust_debuginfo_level_rustc, - Mode::Std => self.config.rust_debuginfo_level_std, - Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustcPrivate | Mode::ToolTarget => { - self.config.rust_debuginfo_level_tools - } - }; - cargo.env(profile_var("DEBUG"), debuginfo_level.to_string()); - if let Some(opt_level) = &self.config.rust_optimize.get_opt_level() { - cargo.env(profile_var("OPT_LEVEL"), opt_level); - } - cargo.env( - profile_var("DEBUG_ASSERTIONS"), - match mode { - Mode::Std => self.config.std_debug_assertions, - Mode::Rustc | Mode::Codegen => self.config.rustc_debug_assertions, - Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustcPrivate | Mode::ToolTarget => { - self.config.tools_debug_assertions - } - } - .to_string(), - ); - cargo.env( - profile_var("OVERFLOW_CHECKS"), - if mode == Mode::Std { - self.config.rust_overflow_checks_std.to_string() - } else { - self.config.rust_overflow_checks.to_string() - }, - ); - match self.config.split_debuginfo(target) { SplitDebuginfo::Packed => rustflags.arg("-Csplit-debuginfo=packed"), SplitDebuginfo::Unpacked => rustflags.arg("-Csplit-debuginfo=unpacked"), @@ -1128,7 +1092,7 @@ impl Builder<'_> { // Any library crate that's part of the sysroot should be marked unstable // (including third-party dependencies), unless it uses a staged_api // `#![stable(..)]` attribute to explicitly mark itself stable. - Mode::Std | Mode::Codegen | Mode::Rustc => { + Mode::Std | Mode::DistStd | Mode::Codegen | Mode::Rustc => { cargo.env("RUSTC_FORCE_UNSTABLE", "1"); } @@ -1182,6 +1146,7 @@ impl Builder<'_> { } } Mode::Std + | Mode::DistStd | Mode::ToolBootstrap | Mode::ToolRustcPrivate | Mode::ToolStd @@ -1221,7 +1186,7 @@ impl Builder<'_> { // For other crates, however, we know that we've already got a standard // library up and running, so we can use the normal compiler to compile // build scripts in that situation. - if mode == Mode::Std { + if mode.is_std() { cargo .env("RUSTC_SNAPSHOT", &self.initial_rustc) .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir()); @@ -1366,7 +1331,7 @@ impl Builder<'_> { // when compiling the standard library, since this might be linked into the final outputs // produced by rustc. Since this mitigation is only available on Windows, only enable it // for the standard library in case the compiler is run on a non-Windows platform. - if cfg!(windows) && mode == Mode::Std && self.config.control_flow_guard { + if cfg!(windows) && mode.is_std() && self.config.control_flow_guard { rustflags.arg("-Ccontrol-flow-guard"); } @@ -1374,7 +1339,7 @@ impl Builder<'_> { // standard library, since this might be linked into the final outputs produced by rustc. // Since this mitigation is only available on Windows, only enable it for the standard // library in case the compiler is run on a non-Windows platform. - if cfg!(windows) && mode == Mode::Std && self.config.ehcont_guard { + if cfg!(windows) && mode.is_std() && self.config.ehcont_guard { rustflags.arg("-Zehcont-guard"); } @@ -1403,15 +1368,6 @@ impl Builder<'_> { cargo.arg("--verbose"); } - match (mode, self.config.rust_codegen_units_std, self.config.rust_codegen_units) { - (Mode::Std, Some(n), _) | (_, _, Some(n)) => { - cargo.env(profile_var("CODEGEN_UNITS"), n.to_string()); - } - _ => { - // Don't set anything - } - } - if self.config.locked_deps { cargo.arg("--locked"); } @@ -1433,7 +1389,7 @@ impl Builder<'_> { // When we build Rust dylibs they're all intended for intermediate // usage, so make sure we pass the -Cprefer-dynamic flag instead of // linking all deps statically into the dylib. - if matches!(mode, Mode::Std) { + if mode.is_std() { rustflags.arg("-Cprefer-dynamic"); } @@ -1455,7 +1411,7 @@ impl Builder<'_> { } } - if matches!(mode, Mode::Std) { + if mode.is_std() { if let Some(mir_opt_level) = self.config.rust_validate_mir_opts { rustflags.arg("-Zvalidate-mir"); rustflags.arg(&format!("-Zmir-opt-level={mir_opt_level}")); @@ -1463,19 +1419,6 @@ impl Builder<'_> { if self.config.rust_randomize_layout { rustflags.arg("--cfg=randomized_layouts"); } - // Always enable inlining MIR when building the standard library. - // Without this flag, MIR inlining is disabled when incremental compilation is enabled. - // That causes some mir-opt tests which inline functions from the standard library to - // break when incremental compilation is enabled. So this overrides the "no inlining - // during incremental builds" heuristic for the standard library. - rustflags.arg("-Zinline-mir"); - - // Similarly, we need to keep debug info for functions inlined into other std functions, - // even if we're not going to output debuginfo for the crate we're currently building, - // so that it'll be available when downstream consumers of std try to use it. - rustflags.arg("-Zinline-mir-preserve-debug"); - - rustflags.arg("-Zmir_strip_debuginfo=locals-in-tiny-functions"); } // take target-specific extra rustflags if any otherwise take `rust.rustflags` @@ -1487,18 +1430,16 @@ impl Builder<'_> { .unwrap_or(&self.config.rust_rustflags) .clone(); - let profile = - if matches!(cmd_kind, Kind::Bench | Kind::Miri | Kind::MiriSetup | Kind::MiriTest) { - // Use the default profile for bench/miri - None - } else { - match (mode, self.config.rust_optimize.is_release()) { - // Some std configuration exists in its own profile - (Mode::Std, _) => Some("dist"), - (_, true) => Some("release"), - (_, false) => Some("dev"), - } - }; + let profile = match (cmd_kind, mode, self.config.rust_optimize.is_release()) { + // Use the default profile for miri + (Kind::Miri | Kind::MiriSetup | Kind::MiriTest, _, _) => None, + // Ensure we build with the `dist` profile when `--dist-std` is provided + (_, Mode::DistStd, _) => Some("dist"), + // Otherwise bench with the default profile, never dev + (Kind::Bench, _, _) => None, + (_, _, true) => Some("release"), + (_, _, false) => Some("dev"), + }; Cargo { command: cargo, @@ -1516,12 +1457,66 @@ impl Builder<'_> { kind: cmd_kind, } } + + fn apply_profile_settings(&self, cargo: &mut BootstrapCommand, mode: Mode) { + let profile_var = |name: &str| cargo_profile_var(name, &self.config, mode); + + cargo.env(profile_var("STRIP"), self.config.rust_strip.to_string()); + + let debuginfo_level = match mode { + Mode::Rustc | Mode::Codegen => self.config.rust_debuginfo_level_rustc, + Mode::Std | Mode::DistStd => self.config.rust_debuginfo_level_std, + Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustcPrivate | Mode::ToolTarget => { + self.config.rust_debuginfo_level_tools + } + }; + cargo.env(profile_var("DEBUG"), debuginfo_level.to_string()); + + if let Some(opt_level) = &self.config.rust_optimize.get_opt_level() { + cargo.env(profile_var("OPT_LEVEL"), opt_level); + } + + cargo.env( + profile_var("DEBUG_ASSERTIONS"), + match mode { + Mode::Std | Mode::DistStd => self.config.std_debug_assertions, + Mode::Rustc | Mode::Codegen => self.config.rustc_debug_assertions, + Mode::ToolBootstrap | Mode::ToolStd | Mode::ToolRustcPrivate | Mode::ToolTarget => { + self.config.tools_debug_assertions + } + } + .to_string(), + ); + + cargo.env( + profile_var("OVERFLOW_CHECKS"), + if mode.is_std() { + self.config.rust_overflow_checks_std.to_string() + } else { + self.config.rust_overflow_checks.to_string() + }, + ); + + match (mode, self.config.rust_codegen_units_std, self.config.rust_codegen_units) { + (Mode::Std, Some(n), _) => { + cargo.env(profile_var("CODEGEN_UNITS"), n.to_string()); + } + (m, _, Some(n)) if m != Mode::DistStd => { + cargo.env(profile_var("CODEGEN_UNITS"), n.to_string()); + } + _ => { + // Don't set anything + } + } + } } pub(crate) fn cargo_profile_var(name: &str, config: &Config, mode: Mode) -> String { let profile = match (mode, config.rust_optimize.is_release()) { // Some std configuration exists in its own profile - (Mode::Std, _) => "DIST", + (Mode::DistStd, _) => { + panic!("Attempted to override the distributed std's profile with {name}") + } (_, true) => "RELEASE", (_, false) => "DEV", }; diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 0bd0781133684..ffff01ab1cc2a 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -1110,8 +1110,8 @@ impl<'a> Builder<'a> { Subcommand::Test { .. } => (Kind::Test, &paths[..]), Subcommand::Miri { .. } => (Kind::Miri, &paths[..]), Subcommand::Bench { .. } => (Kind::Bench, &paths[..]), - Subcommand::Dist => (Kind::Dist, &paths[..]), - Subcommand::Install => (Kind::Install, &paths[..]), + Subcommand::Dist { .. } => (Kind::Dist, &paths[..]), + Subcommand::Install { .. } => (Kind::Install, &paths[..]), Subcommand::Run { .. } => (Kind::Run, &paths[..]), Subcommand::Clean { .. } => (Kind::Clean, &paths[..]), Subcommand::Format { .. } => (Kind::Format, &[][..]), diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index f8b00094a0f4b..0239c01b6adf7 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1199,8 +1199,8 @@ impl Config { flags_stage.or(build_test_stage).unwrap_or(if download_rustc { 2 } else { 1 }) } Subcommand::Bench { .. } => flags_stage.or(build_bench_stage).unwrap_or(2), - Subcommand::Dist => flags_stage.or(build_dist_stage).unwrap_or(2), - Subcommand::Install => flags_stage.or(build_install_stage).unwrap_or(2), + Subcommand::Dist { .. } => flags_stage.or(build_dist_stage).unwrap_or(2), + Subcommand::Install { .. } => flags_stage.or(build_install_stage).unwrap_or(2), Subcommand::Perf { .. } => flags_stage.unwrap_or(1), // Most of the run commands execute bootstrap tools, which don't depend on the compiler. // Other commands listed here should always use bootstrap tools. @@ -1238,10 +1238,10 @@ impl Config { (0, Subcommand::Clippy { .. }) => { check_stage0("clippy"); } - (0, Subcommand::Dist) => { + (0, Subcommand::Dist { .. }) => { check_stage0("dist"); } - (0, Subcommand::Install) => { + (0, Subcommand::Install { .. }) => { check_stage0("install"); } (0, Subcommand::Test { .. }) if build_compiletest_allow_stage0 != Some(true) => { @@ -1272,8 +1272,8 @@ impl Config { | Subcommand::Doc { .. } | Subcommand::Build { .. } | Subcommand::Bench { .. } - | Subcommand::Dist - | Subcommand::Install => { + | Subcommand::Dist { .. } + | Subcommand::Install { .. } => { assert_eq!( stage, 2, "\ diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs index f669e8992ff45..78cfa3ea58cb7 100644 --- a/src/bootstrap/src/core/config/flags.rs +++ b/src/bootstrap/src/core/config/flags.rs @@ -270,6 +270,9 @@ pub enum Subcommand { #[arg(long)] /// Pass `--timings` to Cargo to get crate build timings timings: bool, + #[arg(long)] + /// Build the standard library under the `dist` profile + dist_std: bool, }, #[command(visible_aliases = ["c"], long_about = "\n Arguments: @@ -449,6 +452,9 @@ pub enum Subcommand { #[arg(long)] /// Ignore `//@ ignore-backends` directives. bypass_ignore_backends: bool, + #[arg(long)] + /// Build the standard library under the `dist` profile + dist_std: bool, /// Deprecated. Use `--all-targets` or `--tests` instead. #[arg(long)] @@ -492,6 +498,9 @@ pub enum Subcommand { Bench { #[arg(long, allow_hyphen_values(true))] test_args: Vec, + #[arg(long)] + /// Build the standard library under the `dist` profile + dist_std: bool, }, /// Clean out build directories Clean { @@ -503,9 +512,17 @@ pub enum Subcommand { stage: Option, }, /// Build distribution artifacts - Dist, + Dist { + #[arg(long)] + /// Build the standard library under the `dist` profile + dist_std: bool, + }, /// Install distribution artifacts - Install, + Install { + #[arg(long)] + /// Build the standard library under the `dist` profile + dist_std: bool, + }, #[command(visible_aliases = ["r"], long_about = "\n Arguments: This subcommand accepts a number of paths to tools to build and run. For @@ -554,7 +571,7 @@ Arguments: impl Default for Subcommand { fn default() -> Self { - Subcommand::Build { timings: false } + Subcommand::Build { timings: false, dist_std: false } } } @@ -744,6 +761,17 @@ impl Subcommand { pub(crate) fn check_all_targets(&self) -> bool { matches!(self, Subcommand::Check { all_targets: true, .. }) } + + pub fn dist_std(&self) -> bool { + match *self { + Subcommand::Build { dist_std, .. } + | Subcommand::Test { dist_std, .. } + | Subcommand::Bench { dist_std, .. } + | Subcommand::Dist { dist_std, .. } + | Subcommand::Install { dist_std, .. } => dist_std, + _ => false, + } + } } /// Returns the shell completion for a given shell, if the result differs from the current diff --git a/src/bootstrap/src/core/session.rs b/src/bootstrap/src/core/session.rs index 4ad04df753d00..5ae58197cea9b 100644 --- a/src/bootstrap/src/core/session.rs +++ b/src/bootstrap/src/core/session.rs @@ -106,6 +106,12 @@ pub(crate) enum Mode { /// Build the standard library, placing output in the "stageN-std" directory. Std, + /// Build the standard library intended for distribution. This involves ignoring any + /// bootstrap.toml configuration and following the defined `dist` profile in the library + /// workspace. This ensures that any required configuration is shared for Cargo's build-std + /// implementation. + DistStd, + /// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory. Rustc, @@ -153,7 +159,7 @@ pub(crate) enum Mode { impl Mode { pub(crate) fn must_support_dlopen(&self) -> bool { match self { - Mode::Std | Mode::Codegen => true, + Mode::Std | Mode::DistStd | Mode::Codegen => true, Mode::ToolBootstrap | Mode::ToolRustcPrivate | Mode::ToolStd @@ -161,6 +167,10 @@ impl Mode { | Mode::Rustc => false, } } + + pub(crate) fn is_std(&self) -> bool { + matches!(*self, Mode::Std | Mode::DistStd) + } } /// When `rust.rust_remap_debuginfo` is requested, the compiler needs to know how to @@ -732,7 +742,7 @@ impl Session { /// release/debug) pub(crate) fn cargo_dir(&self, mode: Mode) -> &'static str { match (mode, self.config.rust_optimize.is_release()) { - (Mode::Std, _) => "dist", + (Mode::DistStd, _) => "dist", (_, true) => "release", (_, false) => "debug", } @@ -763,7 +773,7 @@ impl Session { let (stage, suffix) = match mode { // Std is special, stage N std is built with stage N rustc - Mode::Std => (Some(build_compiler.stage), "std"), + Mode::Std | Mode::DistStd => (Some(build_compiler.stage), "std"), // The rest of things are built with stage N-1 rustc Mode::Rustc => (Some(build_compiler.stage + 1), "rustc"), Mode::Codegen => (Some(build_compiler.stage + 1), "codegen"), @@ -881,7 +891,7 @@ impl Session { let actual_stage = match mode.into() { // Std has the same stage as the compiler that builds it - Some(Mode::Std) => target_and_stage.stage, + Some(Mode::Std | Mode::DistStd) => target_and_stage.stage, // Other things have stage corresponding to their build compiler + 1 Some( Mode::Rustc diff --git a/src/bootstrap/src/utils/build_stamp.rs b/src/bootstrap/src/utils/build_stamp.rs index f70c92667a5cf..680f2269e82f9 100644 --- a/src/bootstrap/src/utils/build_stamp.rs +++ b/src/bootstrap/src/utils/build_stamp.rs @@ -150,7 +150,8 @@ pub fn libstd_stamp( build_compiler: Compiler, target: TargetSelection, ) -> BuildStamp { - BuildStamp::new(&builder.cargo_out(build_compiler, Mode::Std, target)).with_prefix("libstd") + let mode = if builder.sess.config.cmd.dist_std() { Mode::DistStd } else { Mode::Std }; + BuildStamp::new(&builder.cargo_out(build_compiler, mode, target)).with_prefix("libstd") } /// Cargo's output path for librustc in a given stage, compiled by a particular diff --git a/src/etc/completions/x.fish b/src/etc/completions/x.fish index 58c5e4255caf6..f75a70d886c8d 100644 --- a/src/etc/completions/x.fish +++ b/src/etc/completions/x.fish @@ -104,6 +104,7 @@ complete -c x -n "__fish_x_using_subcommand build" -l reproducible-artifact -d ' complete -c x -n "__fish_x_using_subcommand build" -l set -d 'override options in bootstrap.toml' -r -f complete -c x -n "__fish_x_using_subcommand build" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" complete -c x -n "__fish_x_using_subcommand build" -l timings -d 'Pass `--timings` to Cargo to get crate build timings' +complete -c x -n "__fish_x_using_subcommand build" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand build" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand build" -s q -l quiet -d 'use quiet output' complete -c x -n "__fish_x_using_subcommand build" -s i -l incremental -d 'use incremental compilation' @@ -141,6 +142,7 @@ complete -c x -n "__fish_x_using_subcommand b" -l reproducible-artifact -d 'Addi complete -c x -n "__fish_x_using_subcommand b" -l set -d 'override options in bootstrap.toml' -r -f complete -c x -n "__fish_x_using_subcommand b" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" complete -c x -n "__fish_x_using_subcommand b" -l timings -d 'Pass `--timings` to Cargo to get crate build timings' +complete -c x -n "__fish_x_using_subcommand b" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand b" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand b" -s q -l quiet -d 'use quiet output' complete -c x -n "__fish_x_using_subcommand b" -s i -l incremental -d 'use incremental compilation' @@ -465,6 +467,7 @@ complete -c x -n "__fish_x_using_subcommand test" -l only-modified -d 'only run complete -c x -n "__fish_x_using_subcommand test" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`' complete -c x -n "__fish_x_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x -n "__fish_x_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x -n "__fish_x_using_subcommand test" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x -n "__fish_x_using_subcommand test" -l record -d 'Record all the failed tests in a file in the build directory' complete -c x -n "__fish_x_using_subcommand test" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`' @@ -522,6 +525,7 @@ complete -c x -n "__fish_x_using_subcommand t" -l only-modified -d 'only run tes complete -c x -n "__fish_x_using_subcommand t" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`' complete -c x -n "__fish_x_using_subcommand t" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x -n "__fish_x_using_subcommand t" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x -n "__fish_x_using_subcommand t" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand t" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x -n "__fish_x_using_subcommand t" -l record -d 'Record all the failed tests in a file in the build directory' complete -c x -n "__fish_x_using_subcommand t" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`' @@ -604,6 +608,7 @@ complete -c x -n "__fish_x_using_subcommand bench" -l llvm-profile-use -d 'use P complete -c x -n "__fish_x_using_subcommand bench" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x -n "__fish_x_using_subcommand bench" -l set -d 'override options in bootstrap.toml' -r -f complete -c x -n "__fish_x_using_subcommand bench" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x -n "__fish_x_using_subcommand bench" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand bench" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand bench" -s q -l quiet -d 'use quiet output' complete -c x -n "__fish_x_using_subcommand bench" -s i -l incremental -d 'use incremental compilation' @@ -677,6 +682,7 @@ complete -c x -n "__fish_x_using_subcommand dist" -l llvm-profile-use -d 'use PG complete -c x -n "__fish_x_using_subcommand dist" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x -n "__fish_x_using_subcommand dist" -l set -d 'override options in bootstrap.toml' -r -f complete -c x -n "__fish_x_using_subcommand dist" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x -n "__fish_x_using_subcommand dist" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand dist" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand dist" -s q -l quiet -d 'use quiet output' complete -c x -n "__fish_x_using_subcommand dist" -s i -l incremental -d 'use incremental compilation' @@ -713,6 +719,7 @@ complete -c x -n "__fish_x_using_subcommand install" -l llvm-profile-use -d 'use complete -c x -n "__fish_x_using_subcommand install" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x -n "__fish_x_using_subcommand install" -l set -d 'override options in bootstrap.toml' -r -f complete -c x -n "__fish_x_using_subcommand install" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x -n "__fish_x_using_subcommand install" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x -n "__fish_x_using_subcommand install" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x -n "__fish_x_using_subcommand install" -s q -l quiet -d 'use quiet output' complete -c x -n "__fish_x_using_subcommand install" -s i -l incremental -d 'use incremental compilation' diff --git a/src/etc/completions/x.ps1 b/src/etc/completions/x.ps1 index bf7ed50a85b90..f51fb19a1e2e2 100644 --- a/src/etc/completions/x.ps1 +++ b/src/etc/completions/x.ps1 @@ -110,6 +110,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--timings', '--timings', [CompletionResultType]::ParameterName, 'Pass `--timings` to Cargo to get crate build timings') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -155,6 +156,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--timings', '--timings', [CompletionResultType]::ParameterName, 'Pass `--timings` to Cargo to get crate build timings') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -543,6 +545,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory') [CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`') @@ -608,6 +611,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory') [CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`') @@ -706,6 +710,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -795,6 +800,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -839,6 +845,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') diff --git a/src/etc/completions/x.py.fish b/src/etc/completions/x.py.fish index 292408fbe49f6..edcc291049495 100644 --- a/src/etc/completions/x.py.fish +++ b/src/etc/completions/x.py.fish @@ -104,6 +104,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand build" -l reproducible-artifac complete -c x.py -n "__fish_x.py_using_subcommand build" -l set -d 'override options in bootstrap.toml' -r -f complete -c x.py -n "__fish_x.py_using_subcommand build" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" complete -c x.py -n "__fish_x.py_using_subcommand build" -l timings -d 'Pass `--timings` to Cargo to get crate build timings' +complete -c x.py -n "__fish_x.py_using_subcommand build" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand build" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand build" -s q -l quiet -d 'use quiet output' complete -c x.py -n "__fish_x.py_using_subcommand build" -s i -l incremental -d 'use incremental compilation' @@ -141,6 +142,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand b" -l reproducible-artifact -d complete -c x.py -n "__fish_x.py_using_subcommand b" -l set -d 'override options in bootstrap.toml' -r -f complete -c x.py -n "__fish_x.py_using_subcommand b" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" complete -c x.py -n "__fish_x.py_using_subcommand b" -l timings -d 'Pass `--timings` to Cargo to get crate build timings' +complete -c x.py -n "__fish_x.py_using_subcommand b" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand b" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand b" -s q -l quiet -d 'use quiet output' complete -c x.py -n "__fish_x.py_using_subcommand b" -s i -l incremental -d 'use incremental compilation' @@ -465,6 +467,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l only-modified -d 'onl complete -c x.py -n "__fish_x.py_using_subcommand test" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`' complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x.py -n "__fish_x.py_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x.py -n "__fish_x.py_using_subcommand test" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x.py -n "__fish_x.py_using_subcommand test" -l record -d 'Record all the failed tests in a file in the build directory' complete -c x.py -n "__fish_x.py_using_subcommand test" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`' @@ -522,6 +525,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand t" -l only-modified -d 'only r complete -c x.py -n "__fish_x.py_using_subcommand t" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`' complete -c x.py -n "__fish_x.py_using_subcommand t" -l no-capture -d 'don\'t capture stdout/stderr of tests' complete -c x.py -n "__fish_x.py_using_subcommand t" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives' +complete -c x.py -n "__fish_x.py_using_subcommand t" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand t" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead' complete -c x.py -n "__fish_x.py_using_subcommand t" -l record -d 'Record all the failed tests in a file in the build directory' complete -c x.py -n "__fish_x.py_using_subcommand t" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`' @@ -604,6 +608,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand bench" -l llvm-profile-use -d complete -c x.py -n "__fish_x.py_using_subcommand bench" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x.py -n "__fish_x.py_using_subcommand bench" -l set -d 'override options in bootstrap.toml' -r -f complete -c x.py -n "__fish_x.py_using_subcommand bench" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x.py -n "__fish_x.py_using_subcommand bench" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand bench" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand bench" -s q -l quiet -d 'use quiet output' complete -c x.py -n "__fish_x.py_using_subcommand bench" -s i -l incremental -d 'use incremental compilation' @@ -677,6 +682,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand dist" -l llvm-profile-use -d ' complete -c x.py -n "__fish_x.py_using_subcommand dist" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x.py -n "__fish_x.py_using_subcommand dist" -l set -d 'override options in bootstrap.toml' -r -f complete -c x.py -n "__fish_x.py_using_subcommand dist" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x.py -n "__fish_x.py_using_subcommand dist" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand dist" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand dist" -s q -l quiet -d 'use quiet output' complete -c x.py -n "__fish_x.py_using_subcommand dist" -s i -l incremental -d 'use incremental compilation' @@ -713,6 +719,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand install" -l llvm-profile-use - complete -c x.py -n "__fish_x.py_using_subcommand install" -l reproducible-artifact -d 'Additional reproducible artifacts that should be added to the reproducible artifacts archive' -r complete -c x.py -n "__fish_x.py_using_subcommand install" -l set -d 'override options in bootstrap.toml' -r -f complete -c x.py -n "__fish_x.py_using_subcommand install" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}" +complete -c x.py -n "__fish_x.py_using_subcommand install" -l dist-std -d 'Build the standard library under the `dist` profile' complete -c x.py -n "__fish_x.py_using_subcommand install" -s v -l verbose -d 'use verbose output (-vv for very verbose)' complete -c x.py -n "__fish_x.py_using_subcommand install" -s q -l quiet -d 'use quiet output' complete -c x.py -n "__fish_x.py_using_subcommand install" -s i -l incremental -d 'use incremental compilation' diff --git a/src/etc/completions/x.py.ps1 b/src/etc/completions/x.py.ps1 index 5ab4cab3a32a3..0c1e4402f4649 100644 --- a/src/etc/completions/x.py.ps1 +++ b/src/etc/completions/x.py.ps1 @@ -110,6 +110,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--timings', '--timings', [CompletionResultType]::ParameterName, 'Pass `--timings` to Cargo to get crate build timings') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -155,6 +156,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') [CompletionResult]::new('--timings', '--timings', [CompletionResultType]::ParameterName, 'Pass `--timings` to Cargo to get crate build timings') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -543,6 +545,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory') [CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`') @@ -608,6 +611,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `//rustfix_missing_coverage.txt`') [CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests') [CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead') [CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory') [CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`') @@ -706,6 +710,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -795,6 +800,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') @@ -839,6 +845,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--reproducible-artifact', '--reproducible-artifact', [CompletionResultType]::ParameterName, 'Additional reproducible artifacts that should be added to the reproducible artifacts archive') [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml') [CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not') + [CompletionResult]::new('--dist-std', '--dist-std', [CompletionResultType]::ParameterName, 'Build the standard library under the `dist` profile') [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)') [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'use quiet output') diff --git a/src/etc/completions/x.py.sh b/src/etc/completions/x.py.sh index 0c449988b0461..79e1a6048805d 100644 --- a/src/etc/completions/x.py.sh +++ b/src/etc/completions/x.py.sh @@ -283,7 +283,7 @@ _x.py() { return 0 ;; x.py__bench) - opts="-v -q -i -j -h --test-args --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --test-args --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -473,7 +473,7 @@ _x.py() { return 0 ;; x.py__build) - opts="-v -q -i -j -h --timings --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --timings --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -659,7 +659,7 @@ _x.py() { return 0 ;; x.py__build) - opts="-v -q -i -j -h --timings --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --timings --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1602,7 +1602,7 @@ _x.py() { return 0 ;; x.py__dist) - opts="-v -q -i -j -h --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2532,7 +2532,7 @@ _x.py() { return 0 ;; x.py__install) - opts="-v -q -i -j -h --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4638,7 +4638,7 @@ _x.py() { return 0 ;; x.py__test) - opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --dist-std --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4856,7 +4856,7 @@ _x.py() { return 0 ;; x.py__test) - opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --dist-std --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.py.zsh b/src/etc/completions/x.py.zsh index 9ee5843a5abd7..7dd6995547b65 100644 --- a/src/etc/completions/x.py.zsh +++ b/src/etc/completions/x.py.zsh @@ -93,6 +93,7 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--timings[Pass \`--timings\` to Cargo to get crate build timings]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -140,6 +141,7 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--timings[Pass \`--timings\` to Cargo to get crate build timings]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -544,6 +546,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '--record[Record all the failed tests in a file in the build directory]' \ '--rerun[Rerun tests that previously failed, and stored with \`--record\`]' \ @@ -611,6 +614,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '--record[Record all the failed tests in a file in the build directory]' \ '--rerun[Rerun tests that previously failed, and stored with \`--record\`]' \ @@ -713,6 +717,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -806,6 +811,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -852,6 +858,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ diff --git a/src/etc/completions/x.sh b/src/etc/completions/x.sh index f8897cc5f5ec8..e5440dcea82c9 100644 --- a/src/etc/completions/x.sh +++ b/src/etc/completions/x.sh @@ -283,7 +283,7 @@ _x() { return 0 ;; x__bench) - opts="-v -q -i -j -h --test-args --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --test-args --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -473,7 +473,7 @@ _x() { return 0 ;; x__build) - opts="-v -q -i -j -h --timings --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --timings --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -659,7 +659,7 @@ _x() { return 0 ;; x__build) - opts="-v -q -i -j -h --timings --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --timings --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1602,7 +1602,7 @@ _x() { return 0 ;; x__dist) - opts="-v -q -i -j -h --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2532,7 +2532,7 @@ _x() { return 0 ;; x__install) - opts="-v -q -i -j -h --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --dist-std --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4638,7 +4638,7 @@ _x() { return 0 ;; x__test) - opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --dist-std --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4856,7 +4856,7 @@ _x() { return 0 ;; x__test) - opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -q -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose-run-make-subprocess-output --test-codegen-backend --bypass-ignore-backends --dist-std --no-doc --record --rerun --verbose --quiet --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/src/etc/completions/x.zsh b/src/etc/completions/x.zsh index f61942a11da4a..b2d5f379f7c80 100644 --- a/src/etc/completions/x.zsh +++ b/src/etc/completions/x.zsh @@ -93,6 +93,7 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--timings[Pass \`--timings\` to Cargo to get crate build timings]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -140,6 +141,7 @@ _arguments "${_arguments_options[@]}" : \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ '--timings[Pass \`--timings\` to Cargo to get crate build timings]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -544,6 +546,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '--record[Record all the failed tests in a file in the build directory]' \ '--rerun[Rerun tests that previously failed, and stored with \`--record\`]' \ @@ -611,6 +614,7 @@ _arguments "${_arguments_options[@]}" : \ '--rustfix-coverage[enable this to generate a Rustfix coverage file, which is saved in \`//rustfix_missing_coverage.txt\`]' \ '--no-capture[don'\''t capture stdout/stderr of tests]' \ '--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \ '--record[Record all the failed tests in a file in the build directory]' \ '--rerun[Rerun tests that previously failed, and stored with \`--record\`]' \ @@ -713,6 +717,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -806,6 +811,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \ @@ -852,6 +858,7 @@ _arguments "${_arguments_options[@]}" : \ '*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \ '*--set=[override options in bootstrap.toml]:section.option=value:' \ '--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \ +'--dist-std[Build the standard library under the \`dist\` profile]' \ '(-q --quiet)*-v[use verbose output (-vv for very verbose)]' \ '(-q --quiet)*--verbose[use verbose output (-vv for very verbose)]' \ '(-v --verbose)-q[use quiet output]' \