This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,22 @@ impl Executor for RlsExecutor {
314
314
// Currently we don't cache nor modify build script args
315
315
let is_build_script = * target. kind ( ) == TargetKind :: CustomBuild ;
316
316
if !self . is_primary_crate ( id) || is_build_script {
317
- let mut cmd = Command :: new ( & env:: var ( "RUSTC" ) . unwrap_or ( "rustc" . to_owned ( ) ) ) ;
318
317
let build_script_notice = if is_build_script { " (build script)" } else { "" } ;
319
318
trace ! ( "rustc not intercepted - {}{}" , id. name( ) , build_script_notice) ;
320
319
321
- // Recreate the command, minus -Zsave-analysis.
320
+ // Recreate the original command, minus -Zsave-analysis. Since the
321
+ // shim sets it internally, be sure not to use it.
322
322
if :: CRATE_BLACKLIST . contains ( & & * crate_name) {
323
+ let mut cmd = cargo_cmd. clone ( ) ;
323
324
let args: Vec < _ > = cmd. get_args ( ) . iter ( ) . cloned ( )
324
325
. filter ( |x| x != "Zsave-analysis" ) . collect ( ) ;
325
326
cmd. args_replace ( & args) ;
327
+
328
+ return cmd. exec ( ) ;
326
329
}
330
+ // TODO: Make sure we don't pass any unstable options (incl. -Zsave-analysis)
331
+ // to the shim. For stable toolchains it won't accept those as arguments,
332
+ // but rather it sets them internally instead to work around that
327
333
return cmd. exec ( ) ;
328
334
}
329
335
You can’t perform that action at this time.
0 commit comments