Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 828f33c

Browse files
authoredMar 21, 2025
Rollup merge of #138743 - onur-ozkan:override-is-ci-behaviour, r=Kobzol
bootstrap: add `--ci` flag To make bootstrap act like it's running on CI, we had to override the `GITHUB_ACTIONS` environment variable which is a hidden detail of `CiEnv::is_ci`. Now, we can use the `--ci` flag directly on bootstrap which will be documented automatically from `x --help`. This also helps us to avoid race conditions on bootstrap (overriding `GITHUB_ACTIONS` env in each test can cause that if we run the tests in parallel) tests.
2 parents 1135a63 + b5eaeaf commit 828f33c

File tree

18 files changed

+415
-74
lines changed

18 files changed

+415
-74
lines changed
 

‎src/bootstrap/src/bin/main.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use bootstrap::{
1414
Build, CONFIG_CHANGE_HISTORY, Config, Flags, Subcommand, debug, find_recent_config_change_ids,
1515
human_readable_changes, t,
1616
};
17-
use build_helper::ci::CiEnv;
1817
#[cfg(feature = "tracing")]
1918
use tracing::instrument;
2019

@@ -70,12 +69,14 @@ fn main() {
7069
}
7170

7271
// check_version warnings are not printed during setup, or during CI
73-
let changelog_suggestion =
74-
if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() || config.dry_run() {
75-
None
76-
} else {
77-
check_version(&config)
78-
};
72+
let changelog_suggestion = if matches!(config.cmd, Subcommand::Setup { .. })
73+
|| config.is_running_on_ci
74+
|| config.dry_run()
75+
{
76+
None
77+
} else {
78+
check_version(&config)
79+
};
7980

8081
// NOTE: Since `./configure` generates a `bootstrap.toml`, distro maintainers will see the
8182
// changelog warning, not the `x.py setup` message.

‎src/bootstrap/src/core/build_steps/format.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::process::Command;
66
use std::sync::Mutex;
77
use std::sync::mpsc::SyncSender;
88

9-
use build_helper::ci::CiEnv;
109
use build_helper::git::get_git_modified_files;
1110
use ignore::WalkBuilder;
1211

@@ -104,7 +103,7 @@ struct RustfmtConfig {
104103

105104
// Prints output describing a collection of paths, with lines such as "formatted modified file
106105
// foo/bar/baz" or "skipped 20 untracked files".
107-
fn print_paths(verb: &str, adjective: Option<&str>, paths: &[String]) {
106+
fn print_paths(build: &Builder<'_>, verb: &str, adjective: Option<&str>, paths: &[String]) {
108107
let len = paths.len();
109108
let adjective =
110109
if let Some(adjective) = adjective { format!("{adjective} ") } else { String::new() };
@@ -115,7 +114,7 @@ fn print_paths(verb: &str, adjective: Option<&str>, paths: &[String]) {
115114
} else {
116115
println!("fmt: {verb} {len} {adjective}files");
117116
}
118-
if len > 1000 && !CiEnv::is_ci() {
117+
if len > 1000 && !build.config.is_running_on_ci {
119118
println!("hint: if this number seems too high, try running `git fetch origin master`");
120119
}
121120
}
@@ -135,7 +134,7 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
135134
// `--all` is specified or we are in CI. We check all files in CI to avoid bugs in
136135
// `get_modified_rs_files` letting regressions slip through; we also care about CI time less
137136
// since this is still very fast compared to building the compiler.
138-
let all = all || CiEnv::is_ci();
137+
let all = all || build.config.is_running_on_ci;
139138

140139
let mut builder = ignore::types::TypesBuilder::new();
141140
builder.add_defaults();
@@ -190,7 +189,7 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
190189
)
191190
.map(|x| x.to_string())
192191
.collect();
193-
print_paths("skipped", Some("untracked"), &untracked_paths);
192+
print_paths(build, "skipped", Some("untracked"), &untracked_paths);
194193

195194
for untracked_path in untracked_paths {
196195
// The leading `/` makes it an exact match against the
@@ -319,7 +318,7 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
319318
});
320319
let mut paths = formatted_paths.into_inner().unwrap();
321320
paths.sort();
322-
print_paths(if check { "checked" } else { "formatted" }, adjective, &paths);
321+
print_paths(build, if check { "checked" } else { "formatted" }, adjective, &paths);
323322

324323
drop(tx);
325324

‎src/bootstrap/src/core/build_steps/gcc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use std::fs;
1212
use std::path::{Path, PathBuf};
1313
use std::sync::OnceLock;
1414

15-
use build_helper::ci::CiEnv;
16-
1715
use crate::core::builder::{Builder, Cargo, Kind, RunConfig, ShouldRun, Step};
1816
use crate::core::config::TargetSelection;
1917
use crate::utils::build_stamp::{BuildStamp, generate_smart_stamp_hash};
@@ -202,7 +200,7 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
202200
// source directories as read-only on Linux.
203201
// Therefore, as a part of the build in CI, we first copy the whole source directory
204202
// to the build directory, and perform the build from there.
205-
let src_dir = if CiEnv::is_ci() {
203+
let src_dir = if builder.config.is_running_on_ci {
206204
let src_dir = builder.gcc_out(target).join("src");
207205
if src_dir.exists() {
208206
builder.remove_dir(&src_dir);

‎src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
266266
/// Returns true if we're running in CI with modified LLVM (and thus can't download it)
267267
pub(crate) fn is_ci_llvm_modified(config: &Config) -> bool {
268268
// If not running in a CI environment, return false.
269-
if !CiEnv::is_ci() {
269+
if !config.is_running_on_ci {
270270
return false;
271271
}
272272

‎src/bootstrap/src/core/builder/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ fn ci_rustc_if_unchanged_logic() {
264264
let mut paths = vec!["compiler"];
265265

266266
// Handle library tree the same way as in `Config::download_ci_rustc_commit`.
267-
if build_helper::ci::CiEnv::is_ci() {
267+
if builder.config.is_running_on_ci {
268268
paths.push("library");
269269
}
270270

‎src/bootstrap/src/core/config/config.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ pub struct Config {
415415

416416
/// Command for visual diff display, e.g. `diff-tool --color=always`.
417417
pub compiletest_diff_tool: Option<String>,
418+
419+
pub is_running_on_ci: bool,
418420
}
419421

420422
#[derive(Clone, Debug, Default)]
@@ -1422,6 +1424,7 @@ impl Config {
14221424
config.llvm_profile_generate = flags.llvm_profile_generate;
14231425
config.enable_bolt_settings = flags.enable_bolt_settings;
14241426
config.bypass_bootstrap_lock = flags.bypass_bootstrap_lock;
1427+
config.is_running_on_ci = flags.ci.unwrap_or(CiEnv::is_ci());
14251428

14261429
// Infer the rest of the configuration.
14271430

@@ -2425,7 +2428,7 @@ impl Config {
24252428

24262429
// CI should always run stage 2 builds, unless it specifically states otherwise
24272430
#[cfg(not(test))]
2428-
if flags.stage.is_none() && build_helper::ci::CiEnv::is_ci() {
2431+
if flags.stage.is_none() && config.is_running_on_ci {
24292432
match config.cmd {
24302433
Subcommand::Test { .. }
24312434
| Subcommand::Miri { .. }
@@ -2647,7 +2650,7 @@ impl Config {
26472650
if !self.llvm_from_ci {
26482651
// This happens when LLVM submodule is updated in CI, we should disable ci-rustc without an error
26492652
// to not break CI. For non-CI environments, we should return an error.
2650-
if CiEnv::is_ci() {
2653+
if self.is_running_on_ci {
26512654
println!("WARNING: LLVM submodule has changes, `download-rustc` will be disabled.");
26522655
return None;
26532656
} else {
@@ -3036,7 +3039,7 @@ impl Config {
30363039
//
30373040
// If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
30383041
// logic accordingly.
3039-
if !CiEnv::is_ci() {
3042+
if !self.is_running_on_ci {
30403043
allowed_paths.push(":!library");
30413044
}
30423045

@@ -3064,7 +3067,7 @@ impl Config {
30643067
.expect("git-commit-info is missing in the project root")
30653068
};
30663069

3067-
if CiEnv::is_ci() && {
3070+
if self.is_running_on_ci && {
30683071
let head_sha =
30693072
output(helpers::git(Some(&self.src)).arg("rev-parse").arg("HEAD").as_command_mut());
30703073
let head_sha = head_sha.trim();

‎src/bootstrap/src/core/config/flags.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ pub struct Flags {
179179
/// arguments passed to subcommands
180180
#[arg(global = true, last(true), value_name = "ARGS")]
181181
pub free_args: Vec<String>,
182+
/// Make bootstrap to behave as it's running on the CI environment or not.
183+
#[arg(global = true, long, value_name = "bool")]
184+
pub ci: Option<bool>,
182185
}
183186

184187
impl Flags {

‎src/bootstrap/src/core/config/tests.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::fs::{File, remove_file};
44
use std::io::Write;
55
use std::path::Path;
66

7+
use build_helper::ci::CiEnv;
78
use clap::CommandFactory;
89
use serde::Deserialize;
910

@@ -532,3 +533,19 @@ fn test_exclude() {
532533

533534
assert_eq!(first_excluded, exclude_path);
534535
}
536+
537+
#[test]
538+
fn test_ci_flag() {
539+
let config = Config::parse_inner(Flags::parse(&["check".into(), "--ci=false".into()]), |&_| {
540+
toml::from_str("")
541+
});
542+
assert!(!config.is_running_on_ci);
543+
544+
let config = Config::parse_inner(Flags::parse(&["check".into(), "--ci=true".into()]), |&_| {
545+
toml::from_str("")
546+
});
547+
assert!(config.is_running_on_ci);
548+
549+
let config = Config::parse_inner(Flags::parse(&["check".into()]), |&_| toml::from_str(""));
550+
assert_eq!(config.is_running_on_ci, CiEnv::is_ci());
551+
}

‎src/bootstrap/src/core/download.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::path::{Path, PathBuf};
66
use std::process::{Command, Stdio};
77
use std::sync::OnceLock;
88

9-
use build_helper::ci::CiEnv;
109
use xz2::bufread::XzDecoder;
1110

1211
use crate::core::config::BUILDER_CONFIG_FILENAME;
@@ -262,7 +261,7 @@ impl Config {
262261
"--fail",
263262
]);
264263
// Don't print progress in CI; the \r wrapping looks bad and downloads don't take long enough for progress to be useful.
265-
if CiEnv::is_ci() {
264+
if self.is_running_on_ci {
266265
curl.arg("--silent");
267266
} else {
268267
curl.arg("--progress-bar");

‎src/bootstrap/src/utils/render_tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::io::{BufRead, BufReader, Read, Write};
1010
use std::process::{ChildStdout, Stdio};
1111
use std::time::Duration;
1212

13-
use build_helper::ci::CiEnv;
1413
use termcolor::{Color, ColorSpec, WriteColor};
1514

1615
use crate::core::builder::Builder;
@@ -187,7 +186,7 @@ impl<'a> Renderer<'a> {
187186

188187
if self.builder.config.verbose_tests {
189188
self.render_test_outcome_verbose(outcome, test);
190-
} else if CiEnv::is_ci() {
189+
} else if self.builder.config.is_running_on_ci {
191190
self.render_test_outcome_ci(outcome, test);
192191
} else {
193192
self.render_test_outcome_terse(outcome, test);

‎src/etc/completions/x.fish

Lines changed: 24 additions & 1 deletion
Large diffs are not rendered by default.

‎src/etc/completions/x.ps1

Lines changed: 23 additions & 0 deletions
Large diffs are not rendered by default.

‎src/etc/completions/x.py.fish

Lines changed: 24 additions & 1 deletion
Large diffs are not rendered by default.

‎src/etc/completions/x.py.ps1

Lines changed: 23 additions & 0 deletions
Large diffs are not rendered by default.

‎src/etc/completions/x.py.sh

Lines changed: 115 additions & 23 deletions
Large diffs are not rendered by default.

‎src/etc/completions/x.py.zsh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ _x.py() {
3838
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
3939
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
4040
'*--set=[override options in bootstrap.toml]:section.option=value:' \
41+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
4142
'*-v[use verbose output (-vv for very verbose)]' \
4243
'*--verbose[use verbose output (-vv for very verbose)]' \
4344
'-i[use incremental compilation]' \
@@ -88,6 +89,7 @@ _arguments "${_arguments_options[@]}" : \
8889
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
8990
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
9091
'*--set=[override options in bootstrap.toml]:section.option=value:' \
92+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
9193
'*-v[use verbose output (-vv for very verbose)]' \
9294
'*--verbose[use verbose output (-vv for very verbose)]' \
9395
'-i[use incremental compilation]' \
@@ -130,6 +132,7 @@ _arguments "${_arguments_options[@]}" : \
130132
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
131133
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
132134
'*--set=[override options in bootstrap.toml]:section.option=value:' \
135+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
133136
'--all-targets[Check all targets]' \
134137
'*-v[use verbose output (-vv for very verbose)]' \
135138
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -177,6 +180,7 @@ _arguments "${_arguments_options[@]}" : \
177180
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
178181
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
179182
'*--set=[override options in bootstrap.toml]:section.option=value:' \
183+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
180184
'--fix[]' \
181185
'--allow-dirty[]' \
182186
'--allow-staged[]' \
@@ -222,6 +226,7 @@ _arguments "${_arguments_options[@]}" : \
222226
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
223227
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
224228
'*--set=[override options in bootstrap.toml]:section.option=value:' \
229+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
225230
'*-v[use verbose output (-vv for very verbose)]' \
226231
'*--verbose[use verbose output (-vv for very verbose)]' \
227232
'-i[use incremental compilation]' \
@@ -264,6 +269,7 @@ _arguments "${_arguments_options[@]}" : \
264269
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
265270
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
266271
'*--set=[override options in bootstrap.toml]:section.option=value:' \
272+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
267273
'--check[check formatting instead of applying]' \
268274
'--all[apply to all appropriate files, not just those that have been modified]' \
269275
'*-v[use verbose output (-vv for very verbose)]' \
@@ -308,6 +314,7 @@ _arguments "${_arguments_options[@]}" : \
308314
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
309315
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
310316
'*--set=[override options in bootstrap.toml]:section.option=value:' \
317+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
311318
'--open[open the docs in a browser]' \
312319
'--json[render the documentation in JSON format in addition to the usual HTML format]' \
313320
'*-v[use verbose output (-vv for very verbose)]' \
@@ -358,6 +365,7 @@ _arguments "${_arguments_options[@]}" : \
358365
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
359366
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
360367
'*--set=[override options in bootstrap.toml]:section.option=value:' \
368+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
361369
'--no-fail-fast[run all tests regardless of failure]' \
362370
'--no-doc[do not run doc tests]' \
363371
'--doc[only run doc tests]' \
@@ -409,6 +417,7 @@ _arguments "${_arguments_options[@]}" : \
409417
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
410418
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
411419
'*--set=[override options in bootstrap.toml]:section.option=value:' \
420+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
412421
'--no-fail-fast[run all tests regardless of failure]' \
413422
'--no-doc[do not run doc tests]' \
414423
'--doc[only run doc tests]' \
@@ -455,6 +464,7 @@ _arguments "${_arguments_options[@]}" : \
455464
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
456465
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
457466
'*--set=[override options in bootstrap.toml]:section.option=value:' \
467+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
458468
'*-v[use verbose output (-vv for very verbose)]' \
459469
'*--verbose[use verbose output (-vv for very verbose)]' \
460470
'-i[use incremental compilation]' \
@@ -497,6 +507,7 @@ _arguments "${_arguments_options[@]}" : \
497507
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
498508
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
499509
'*--set=[override options in bootstrap.toml]:section.option=value:' \
510+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
500511
'--all[Clean the entire build directory (not used by default)]' \
501512
'*-v[use verbose output (-vv for very verbose)]' \
502513
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -540,6 +551,7 @@ _arguments "${_arguments_options[@]}" : \
540551
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
541552
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
542553
'*--set=[override options in bootstrap.toml]:section.option=value:' \
554+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
543555
'*-v[use verbose output (-vv for very verbose)]' \
544556
'*--verbose[use verbose output (-vv for very verbose)]' \
545557
'-i[use incremental compilation]' \
@@ -582,6 +594,7 @@ _arguments "${_arguments_options[@]}" : \
582594
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
583595
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
584596
'*--set=[override options in bootstrap.toml]:section.option=value:' \
597+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
585598
'*-v[use verbose output (-vv for very verbose)]' \
586599
'*--verbose[use verbose output (-vv for very verbose)]' \
587600
'-i[use incremental compilation]' \
@@ -625,6 +638,7 @@ _arguments "${_arguments_options[@]}" : \
625638
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
626639
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
627640
'*--set=[override options in bootstrap.toml]:section.option=value:' \
641+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
628642
'*-v[use verbose output (-vv for very verbose)]' \
629643
'*--verbose[use verbose output (-vv for very verbose)]' \
630644
'-i[use incremental compilation]' \
@@ -667,6 +681,7 @@ _arguments "${_arguments_options[@]}" : \
667681
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
668682
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
669683
'*--set=[override options in bootstrap.toml]:section.option=value:' \
684+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
670685
'*-v[use verbose output (-vv for very verbose)]' \
671686
'*--verbose[use verbose output (-vv for very verbose)]' \
672687
'-i[use incremental compilation]' \
@@ -710,6 +725,7 @@ _arguments "${_arguments_options[@]}" : \
710725
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
711726
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
712727
'*--set=[override options in bootstrap.toml]:section.option=value:' \
728+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
713729
'--run[run suggested tests]' \
714730
'*-v[use verbose output (-vv for very verbose)]' \
715731
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -754,6 +770,7 @@ _arguments "${_arguments_options[@]}" : \
754770
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
755771
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
756772
'*--set=[override options in bootstrap.toml]:section.option=value:' \
773+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
757774
'--versioned-dirs[Always include version in subdir name]' \
758775
'*-v[use verbose output (-vv for very verbose)]' \
759776
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -797,6 +814,7 @@ _arguments "${_arguments_options[@]}" : \
797814
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
798815
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
799816
'*--set=[override options in bootstrap.toml]:section.option=value:' \
817+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
800818
'*-v[use verbose output (-vv for very verbose)]' \
801819
'*--verbose[use verbose output (-vv for very verbose)]' \
802820
'-i[use incremental compilation]' \
@@ -851,6 +869,7 @@ _arguments "${_arguments_options[@]}" : \
851869
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
852870
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
853871
'*--set=[override options in bootstrap.toml]:section.option=value:' \
872+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
854873
'*-v[use verbose output (-vv for very verbose)]' \
855874
'*--verbose[use verbose output (-vv for very verbose)]' \
856875
'-i[use incremental compilation]' \
@@ -896,6 +915,7 @@ _arguments "${_arguments_options[@]}" : \
896915
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
897916
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
898917
'*--set=[override options in bootstrap.toml]:section.option=value:' \
918+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
899919
'*-v[use verbose output (-vv for very verbose)]' \
900920
'*--verbose[use verbose output (-vv for very verbose)]' \
901921
'-i[use incremental compilation]' \
@@ -941,6 +961,7 @@ _arguments "${_arguments_options[@]}" : \
941961
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
942962
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
943963
'*--set=[override options in bootstrap.toml]:section.option=value:' \
964+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
944965
'*-v[use verbose output (-vv for very verbose)]' \
945966
'*--verbose[use verbose output (-vv for very verbose)]' \
946967
'-i[use incremental compilation]' \
@@ -986,6 +1007,7 @@ _arguments "${_arguments_options[@]}" : \
9861007
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
9871008
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
9881009
'*--set=[override options in bootstrap.toml]:section.option=value:' \
1010+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
9891011
'*-v[use verbose output (-vv for very verbose)]' \
9901012
'*--verbose[use verbose output (-vv for very verbose)]' \
9911013
'-i[use incremental compilation]' \
@@ -1029,6 +1051,7 @@ _arguments "${_arguments_options[@]}" : \
10291051
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
10301052
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
10311053
'*--set=[override options in bootstrap.toml]:section.option=value:' \
1054+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
10321055
'*-v[use verbose output (-vv for very verbose)]' \
10331056
'*--verbose[use verbose output (-vv for very verbose)]' \
10341057
'-i[use incremental compilation]' \

‎src/etc/completions/x.sh

Lines changed: 115 additions & 23 deletions
Large diffs are not rendered by default.

‎src/etc/completions/x.zsh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ _x() {
3838
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
3939
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
4040
'*--set=[override options in bootstrap.toml]:section.option=value:' \
41+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
4142
'*-v[use verbose output (-vv for very verbose)]' \
4243
'*--verbose[use verbose output (-vv for very verbose)]' \
4344
'-i[use incremental compilation]' \
@@ -88,6 +89,7 @@ _arguments "${_arguments_options[@]}" : \
8889
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
8990
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
9091
'*--set=[override options in bootstrap.toml]:section.option=value:' \
92+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
9193
'*-v[use verbose output (-vv for very verbose)]' \
9294
'*--verbose[use verbose output (-vv for very verbose)]' \
9395
'-i[use incremental compilation]' \
@@ -130,6 +132,7 @@ _arguments "${_arguments_options[@]}" : \
130132
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
131133
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
132134
'*--set=[override options in bootstrap.toml]:section.option=value:' \
135+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
133136
'--all-targets[Check all targets]' \
134137
'*-v[use verbose output (-vv for very verbose)]' \
135138
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -177,6 +180,7 @@ _arguments "${_arguments_options[@]}" : \
177180
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
178181
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
179182
'*--set=[override options in bootstrap.toml]:section.option=value:' \
183+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
180184
'--fix[]' \
181185
'--allow-dirty[]' \
182186
'--allow-staged[]' \
@@ -222,6 +226,7 @@ _arguments "${_arguments_options[@]}" : \
222226
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
223227
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
224228
'*--set=[override options in bootstrap.toml]:section.option=value:' \
229+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
225230
'*-v[use verbose output (-vv for very verbose)]' \
226231
'*--verbose[use verbose output (-vv for very verbose)]' \
227232
'-i[use incremental compilation]' \
@@ -264,6 +269,7 @@ _arguments "${_arguments_options[@]}" : \
264269
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
265270
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
266271
'*--set=[override options in bootstrap.toml]:section.option=value:' \
272+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
267273
'--check[check formatting instead of applying]' \
268274
'--all[apply to all appropriate files, not just those that have been modified]' \
269275
'*-v[use verbose output (-vv for very verbose)]' \
@@ -308,6 +314,7 @@ _arguments "${_arguments_options[@]}" : \
308314
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
309315
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
310316
'*--set=[override options in bootstrap.toml]:section.option=value:' \
317+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
311318
'--open[open the docs in a browser]' \
312319
'--json[render the documentation in JSON format in addition to the usual HTML format]' \
313320
'*-v[use verbose output (-vv for very verbose)]' \
@@ -358,6 +365,7 @@ _arguments "${_arguments_options[@]}" : \
358365
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
359366
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
360367
'*--set=[override options in bootstrap.toml]:section.option=value:' \
368+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
361369
'--no-fail-fast[run all tests regardless of failure]' \
362370
'--no-doc[do not run doc tests]' \
363371
'--doc[only run doc tests]' \
@@ -409,6 +417,7 @@ _arguments "${_arguments_options[@]}" : \
409417
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
410418
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
411419
'*--set=[override options in bootstrap.toml]:section.option=value:' \
420+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
412421
'--no-fail-fast[run all tests regardless of failure]' \
413422
'--no-doc[do not run doc tests]' \
414423
'--doc[only run doc tests]' \
@@ -455,6 +464,7 @@ _arguments "${_arguments_options[@]}" : \
455464
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
456465
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
457466
'*--set=[override options in bootstrap.toml]:section.option=value:' \
467+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
458468
'*-v[use verbose output (-vv for very verbose)]' \
459469
'*--verbose[use verbose output (-vv for very verbose)]' \
460470
'-i[use incremental compilation]' \
@@ -497,6 +507,7 @@ _arguments "${_arguments_options[@]}" : \
497507
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
498508
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
499509
'*--set=[override options in bootstrap.toml]:section.option=value:' \
510+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
500511
'--all[Clean the entire build directory (not used by default)]' \
501512
'*-v[use verbose output (-vv for very verbose)]' \
502513
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -540,6 +551,7 @@ _arguments "${_arguments_options[@]}" : \
540551
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
541552
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
542553
'*--set=[override options in bootstrap.toml]:section.option=value:' \
554+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
543555
'*-v[use verbose output (-vv for very verbose)]' \
544556
'*--verbose[use verbose output (-vv for very verbose)]' \
545557
'-i[use incremental compilation]' \
@@ -582,6 +594,7 @@ _arguments "${_arguments_options[@]}" : \
582594
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
583595
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
584596
'*--set=[override options in bootstrap.toml]:section.option=value:' \
597+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
585598
'*-v[use verbose output (-vv for very verbose)]' \
586599
'*--verbose[use verbose output (-vv for very verbose)]' \
587600
'-i[use incremental compilation]' \
@@ -625,6 +638,7 @@ _arguments "${_arguments_options[@]}" : \
625638
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
626639
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
627640
'*--set=[override options in bootstrap.toml]:section.option=value:' \
641+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
628642
'*-v[use verbose output (-vv for very verbose)]' \
629643
'*--verbose[use verbose output (-vv for very verbose)]' \
630644
'-i[use incremental compilation]' \
@@ -667,6 +681,7 @@ _arguments "${_arguments_options[@]}" : \
667681
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
668682
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
669683
'*--set=[override options in bootstrap.toml]:section.option=value:' \
684+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
670685
'*-v[use verbose output (-vv for very verbose)]' \
671686
'*--verbose[use verbose output (-vv for very verbose)]' \
672687
'-i[use incremental compilation]' \
@@ -710,6 +725,7 @@ _arguments "${_arguments_options[@]}" : \
710725
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
711726
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
712727
'*--set=[override options in bootstrap.toml]:section.option=value:' \
728+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
713729
'--run[run suggested tests]' \
714730
'*-v[use verbose output (-vv for very verbose)]' \
715731
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -754,6 +770,7 @@ _arguments "${_arguments_options[@]}" : \
754770
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
755771
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
756772
'*--set=[override options in bootstrap.toml]:section.option=value:' \
773+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
757774
'--versioned-dirs[Always include version in subdir name]' \
758775
'*-v[use verbose output (-vv for very verbose)]' \
759776
'*--verbose[use verbose output (-vv for very verbose)]' \
@@ -797,6 +814,7 @@ _arguments "${_arguments_options[@]}" : \
797814
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
798815
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
799816
'*--set=[override options in bootstrap.toml]:section.option=value:' \
817+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
800818
'*-v[use verbose output (-vv for very verbose)]' \
801819
'*--verbose[use verbose output (-vv for very verbose)]' \
802820
'-i[use incremental compilation]' \
@@ -851,6 +869,7 @@ _arguments "${_arguments_options[@]}" : \
851869
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
852870
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
853871
'*--set=[override options in bootstrap.toml]:section.option=value:' \
872+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
854873
'*-v[use verbose output (-vv for very verbose)]' \
855874
'*--verbose[use verbose output (-vv for very verbose)]' \
856875
'-i[use incremental compilation]' \
@@ -896,6 +915,7 @@ _arguments "${_arguments_options[@]}" : \
896915
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
897916
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
898917
'*--set=[override options in bootstrap.toml]:section.option=value:' \
918+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
899919
'*-v[use verbose output (-vv for very verbose)]' \
900920
'*--verbose[use verbose output (-vv for very verbose)]' \
901921
'-i[use incremental compilation]' \
@@ -941,6 +961,7 @@ _arguments "${_arguments_options[@]}" : \
941961
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
942962
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
943963
'*--set=[override options in bootstrap.toml]:section.option=value:' \
964+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
944965
'*-v[use verbose output (-vv for very verbose)]' \
945966
'*--verbose[use verbose output (-vv for very verbose)]' \
946967
'-i[use incremental compilation]' \
@@ -986,6 +1007,7 @@ _arguments "${_arguments_options[@]}" : \
9861007
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
9871008
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
9881009
'*--set=[override options in bootstrap.toml]:section.option=value:' \
1010+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
9891011
'*-v[use verbose output (-vv for very verbose)]' \
9901012
'*--verbose[use verbose output (-vv for very verbose)]' \
9911013
'-i[use incremental compilation]' \
@@ -1029,6 +1051,7 @@ _arguments "${_arguments_options[@]}" : \
10291051
'--llvm-profile-use=[use PGO profile for LLVM build]:PROFILE:_files' \
10301052
'*--reproducible-artifact=[Additional reproducible artifacts that should be added to the reproducible artifacts archive]:REPRODUCIBLE_ARTIFACT:_default' \
10311053
'*--set=[override options in bootstrap.toml]:section.option=value:' \
1054+
'--ci=[Make bootstrap to behave as it'\''s running on the CI environment or not]:bool:(true false)' \
10321055
'*-v[use verbose output (-vv for very verbose)]' \
10331056
'*--verbose[use verbose output (-vv for very verbose)]' \
10341057
'-i[use incremental compilation]' \

0 commit comments

Comments
 (0)
Please sign in to comment.