Skip to content

Commit 3618709

Browse files
authored
Unrolled build for rust-lang#124445
Rollup merge of rust-lang#124445 - Enselic:global-true, r=onur-ozkan bootstrap: Change `global(true)` to `global = true` for flags for consistency All other arg properties use the `prop = value` style, which makes it slightly annoying to use the `prop(value)` only style for `global`. Change to `prop = value` also for `global` for consistency.
2 parents 825e831 + 4c2a7d1 commit 3618709

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

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

+40-40
Original file line numberDiff line numberDiff line change
@@ -41,72 +41,72 @@ pub struct Flags {
4141
#[command(subcommand)]
4242
pub cmd: Subcommand,
4343

44-
#[arg(global(true), short, long, action = clap::ArgAction::Count)]
44+
#[arg(global = true, short, long, action = clap::ArgAction::Count)]
4545
/// use verbose output (-vv for very verbose)
4646
pub verbose: u8, // each extra -v after the first is passed to Cargo
47-
#[arg(global(true), short, long)]
47+
#[arg(global = true, short, long)]
4848
/// use incremental compilation
4949
pub incremental: bool,
50-
#[arg(global(true), long, value_hint = clap::ValueHint::FilePath, value_name = "FILE")]
50+
#[arg(global = true, long, value_hint = clap::ValueHint::FilePath, value_name = "FILE")]
5151
/// TOML configuration file for build
5252
pub config: Option<PathBuf>,
53-
#[arg(global(true), long, value_hint = clap::ValueHint::DirPath, value_name = "DIR")]
53+
#[arg(global = true, long, value_hint = clap::ValueHint::DirPath, value_name = "DIR")]
5454
/// Build directory, overrides `build.build-dir` in `config.toml`
5555
pub build_dir: Option<PathBuf>,
5656

57-
#[arg(global(true), long, value_hint = clap::ValueHint::Other, value_name = "BUILD")]
57+
#[arg(global = true, long, value_hint = clap::ValueHint::Other, value_name = "BUILD")]
5858
/// build target of the stage0 compiler
5959
pub build: Option<String>,
6060

61-
#[arg(global(true), long, value_hint = clap::ValueHint::Other, value_name = "HOST", value_parser = target_selection_list)]
61+
#[arg(global = true, long, value_hint = clap::ValueHint::Other, value_name = "HOST", value_parser = target_selection_list)]
6262
/// host targets to build
6363
pub host: Option<TargetSelectionList>,
6464

65-
#[arg(global(true), long, value_hint = clap::ValueHint::Other, value_name = "TARGET", value_parser = target_selection_list)]
65+
#[arg(global = true, long, value_hint = clap::ValueHint::Other, value_name = "TARGET", value_parser = target_selection_list)]
6666
/// target targets to build
6767
pub target: Option<TargetSelectionList>,
6868

69-
#[arg(global(true), long, value_name = "PATH")]
69+
#[arg(global = true, long, value_name = "PATH")]
7070
/// build paths to exclude
7171
pub exclude: Vec<PathBuf>, // keeping for client backward compatibility
72-
#[arg(global(true), long, value_name = "PATH")]
72+
#[arg(global = true, long, value_name = "PATH")]
7373
/// build paths to skip
7474
pub skip: Vec<PathBuf>,
75-
#[arg(global(true), long)]
75+
#[arg(global = true, long)]
7676
/// include default paths in addition to the provided ones
7777
pub include_default_paths: bool,
7878

79-
#[arg(global(true), value_hint = clap::ValueHint::Other, long)]
79+
#[arg(global = true, value_hint = clap::ValueHint::Other, long)]
8080
pub rustc_error_format: Option<String>,
8181

82-
#[arg(global(true), long, value_hint = clap::ValueHint::CommandString, value_name = "CMD")]
82+
#[arg(global = true, long, value_hint = clap::ValueHint::CommandString, value_name = "CMD")]
8383
/// command to run on failure
8484
pub on_fail: Option<String>,
85-
#[arg(global(true), long)]
85+
#[arg(global = true, long)]
8686
/// dry run; don't build anything
8787
pub dry_run: bool,
8888
/// Indicates whether to dump the work done from bootstrap shims
89-
#[arg(global(true), long)]
89+
#[arg(global = true, long)]
9090
pub dump_bootstrap_shims: bool,
91-
#[arg(global(true), value_hint = clap::ValueHint::Other, long, value_name = "N")]
91+
#[arg(global = true, value_hint = clap::ValueHint::Other, long, value_name = "N")]
9292
/// stage to build (indicates compiler to use/test, e.g., stage 0 uses the
9393
/// bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)
9494
pub stage: Option<u32>,
9595

96-
#[arg(global(true), value_hint = clap::ValueHint::Other, long, value_name = "N")]
96+
#[arg(global = true, value_hint = clap::ValueHint::Other, long, value_name = "N")]
9797
/// stage(s) to keep without recompiling
9898
/// (pass multiple times to keep e.g., both stages 0 and 1)
9999
pub keep_stage: Vec<u32>,
100-
#[arg(global(true), value_hint = clap::ValueHint::Other, long, value_name = "N")]
100+
#[arg(global = true, value_hint = clap::ValueHint::Other, long, value_name = "N")]
101101
/// stage(s) of the standard library to keep without recompiling
102102
/// (pass multiple times to keep e.g., both stages 0 and 1)
103103
pub keep_stage_std: Vec<u32>,
104-
#[arg(global(true), long, value_hint = clap::ValueHint::DirPath, value_name = "DIR")]
104+
#[arg(global = true, long, value_hint = clap::ValueHint::DirPath, value_name = "DIR")]
105105
/// path to the root of the rust checkout
106106
pub src: Option<PathBuf>,
107107

108108
#[arg(
109-
global(true),
109+
global = true,
110110
short,
111111
long,
112112
value_hint = clap::ValueHint::Other,
@@ -117,68 +117,68 @@ pub struct Flags {
117117
pub jobs: usize,
118118
// This overrides the deny-warnings configuration option,
119119
// which passes -Dwarnings to the compiler invocations.
120-
#[arg(global(true), long)]
120+
#[arg(global = true, long)]
121121
#[arg(value_enum, default_value_t=Warnings::Default, value_name = "deny|warn")]
122122
/// if value is deny, will deny warnings
123123
/// if value is warn, will emit warnings
124124
/// otherwise, use the default configured behaviour
125125
pub warnings: Warnings,
126126

127-
#[arg(global(true), value_hint = clap::ValueHint::Other, long, value_name = "FORMAT")]
127+
#[arg(global = true, value_hint = clap::ValueHint::Other, long, value_name = "FORMAT")]
128128
/// rustc error format
129129
pub error_format: Option<String>,
130-
#[arg(global(true), long)]
130+
#[arg(global = true, long)]
131131
/// use message-format=json
132132
pub json_output: bool,
133133

134-
#[arg(global(true), long, value_name = "STYLE")]
134+
#[arg(global = true, long, value_name = "STYLE")]
135135
#[arg(value_enum, default_value_t = Color::Auto)]
136136
/// whether to use color in cargo and rustc output
137137
pub color: Color,
138138

139-
#[arg(global(true), long)]
139+
#[arg(global = true, long)]
140140
/// Bootstrap uses this value to decide whether it should bypass locking the build process.
141141
/// This is rarely needed (e.g., compiling the std library for different targets in parallel).
142142
///
143143
/// Unless you know exactly what you are doing, you probably don't need this.
144144
pub bypass_bootstrap_lock: bool,
145145

146146
/// whether rebuilding llvm should be skipped, overriding `skip-rebuld` in config.toml
147-
#[arg(global(true), long, value_name = "VALUE")]
147+
#[arg(global = true, long, value_name = "VALUE")]
148148
pub llvm_skip_rebuild: Option<bool>,
149149
/// generate PGO profile with rustc build
150-
#[arg(global(true), value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
150+
#[arg(global = true, value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
151151
pub rust_profile_generate: Option<String>,
152152
/// use PGO profile for rustc build
153-
#[arg(global(true), value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
153+
#[arg(global = true, value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
154154
pub rust_profile_use: Option<String>,
155155
/// use PGO profile for LLVM build
156-
#[arg(global(true), value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
156+
#[arg(global = true, value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
157157
pub llvm_profile_use: Option<String>,
158158
// LLVM doesn't support a custom location for generating profile
159159
// information.
160160
//
161161
// llvm_out/build/profiles/ is the location this writes to.
162162
/// generate PGO profile with llvm built for rustc
163-
#[arg(global(true), long)]
163+
#[arg(global = true, long)]
164164
pub llvm_profile_generate: bool,
165165
/// Enable BOLT link flags
166-
#[arg(global(true), long)]
166+
#[arg(global = true, long)]
167167
pub enable_bolt_settings: bool,
168168
/// Skip stage0 compiler validation
169-
#[arg(global(true), long)]
169+
#[arg(global = true, long)]
170170
pub skip_stage0_validation: bool,
171171
/// Additional reproducible artifacts that should be added to the reproducible artifacts archive.
172-
#[arg(global(true), long)]
172+
#[arg(global = true, long)]
173173
pub reproducible_artifact: Vec<String>,
174-
#[arg(global(true))]
174+
#[arg(global = true)]
175175
/// paths for the subcommand
176176
pub paths: Vec<PathBuf>,
177177
/// override options in config.toml
178-
#[arg(global(true), value_hint = clap::ValueHint::Other, long, value_name = "section.option=value")]
178+
#[arg(global = true, value_hint = clap::ValueHint::Other, long, value_name = "section.option=value")]
179179
pub set: Vec<String>,
180180
/// arguments passed to subcommands
181-
#[arg(global(true), last(true), value_name = "ARGS")]
181+
#[arg(global = true, last(true), value_name = "ARGS")]
182182
pub free_args: Vec<String>,
183183
}
184184

@@ -192,7 +192,7 @@ impl Flags {
192192
struct HelpVerboseOnly {
193193
#[arg(short, long)]
194194
help: bool,
195-
#[arg(global(true), short, long, action = clap::ArgAction::Count)]
195+
#[arg(global = true, short, long, action = clap::ArgAction::Count)]
196196
pub verbose: u8,
197197
#[arg(value_enum)]
198198
cmd: Kind,
@@ -260,16 +260,16 @@ pub enum Subcommand {
260260
#[arg(long, requires = "fix")]
261261
allow_staged: bool,
262262
/// clippy lints to allow
263-
#[arg(global(true), short = 'A', action = clap::ArgAction::Append, value_name = "LINT")]
263+
#[arg(global = true, short = 'A', action = clap::ArgAction::Append, value_name = "LINT")]
264264
allow: Vec<String>,
265265
/// clippy lints to deny
266-
#[arg(global(true), short = 'D', action = clap::ArgAction::Append, value_name = "LINT")]
266+
#[arg(global = true, short = 'D', action = clap::ArgAction::Append, value_name = "LINT")]
267267
deny: Vec<String>,
268268
/// clippy lints to warn on
269-
#[arg(global(true), short = 'W', action = clap::ArgAction::Append, value_name = "LINT")]
269+
#[arg(global = true, short = 'W', action = clap::ArgAction::Append, value_name = "LINT")]
270270
warn: Vec<String>,
271271
/// clippy lints to forbid
272-
#[arg(global(true), short = 'F', action = clap::ArgAction::Append, value_name = "LINT")]
272+
#[arg(global = true, short = 'F', action = clap::ArgAction::Append, value_name = "LINT")]
273273
forbid: Vec<String>,
274274
},
275275
/// Run cargo fix

0 commit comments

Comments
 (0)