@@ -131,7 +131,6 @@ impl Crate {
131
131
"--" ,
132
132
"cargo" ,
133
133
] ) ;
134
- cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
135
134
} else {
136
135
cmd = Command :: new ( "cargo" ) ;
137
136
}
@@ -254,17 +253,25 @@ fn normalize_diag(
254
253
255
254
/// Builds clippy inside the repo to make sure we have a clippy executable we can use.
256
255
fn build_clippy ( release_build : bool ) -> String {
257
- let output = Command :: new ( "cargo" )
256
+ let mut build_cmd = Command :: new ( "cargo" ) ;
257
+ build_cmd
258
258
. args ( [
259
259
"run" ,
260
260
"--bin=clippy-driver" ,
261
261
if release_build { "-r" } else { "" } ,
262
262
"--" ,
263
263
"--version" ,
264
- ] )
264
+ ] ) ;
265
+
266
+ if release_build {
267
+ build_cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
268
+ }
269
+
270
+ let output = build_cmd
265
271
. stderr ( Stdio :: inherit ( ) )
266
272
. output ( )
267
273
. unwrap ( ) ;
274
+
268
275
if !output. status . success ( ) {
269
276
eprintln ! ( "Error: Failed to compile Clippy!" ) ;
270
277
std:: process:: exit ( 1 ) ;
@@ -286,13 +293,6 @@ fn main() {
286
293
287
294
let config = LintcheckConfig :: new ( ) ;
288
295
289
- if config. perf && config. max_jobs != 1 {
290
- eprintln ! (
291
- "Lintcheck's --perf flag must be triggered only with 1 job,\n remove either the --jobs/-j flag or the --perf flag"
292
- ) ;
293
- return ;
294
- }
295
-
296
296
match config. subcommand {
297
297
Some ( Commands :: Diff { old, new, truncate } ) => json:: diff ( & old, & new, truncate) ,
298
298
Some ( Commands :: Popular { output, number } ) => popular_crates:: fetch ( output, number) . unwrap ( ) ,
0 commit comments