@@ -68,10 +68,9 @@ fn main() {
68
68
// otherwise, substitute whatever cargo thinks rustc should be with RUSTC_REAL.
69
69
// NOTE: this means we ignore RUSTC in the environment.
70
70
// FIXME: We might want to consider removing RUSTC_REAL and setting RUSTC directly?
71
- let target_name = target
72
- . map ( |s| s. to_owned ( ) )
73
- . unwrap_or_else ( || env:: var ( "CFG_COMPILER_HOST_TRIPLE" ) . unwrap ( ) ) ;
74
- let is_clippy = args[ 0 ] . to_string_lossy ( ) . ends_with ( & exe ( "clippy-driver" , & target_name) ) ;
71
+ // NOTE: we intentionally pass the name of the host, not the target.
72
+ let host = env:: var ( "CFG_COMPILER_BUILD_TRIPLE" ) . unwrap ( ) ;
73
+ let is_clippy = args[ 0 ] . to_string_lossy ( ) . ends_with ( & exe ( "clippy-driver" , & host) ) ;
75
74
let rustc_driver = if is_clippy {
76
75
if is_build_script {
77
76
// Don't run clippy on build scripts (for one thing, we may not have libstd built with
@@ -87,8 +86,6 @@ fn main() {
87
86
// don't remove the first arg if we're being run as RUSTC instead of RUSTC_WRAPPER.
88
87
// Cargo also sometimes doesn't pass the `.exe` suffix on Windows - add it manually.
89
88
let current_exe = env:: current_exe ( ) . expect ( "couldn't get path to rustc shim" ) ;
90
- // NOTE: we intentionally pass the name of the host, not the target.
91
- let host = env:: var ( "CFG_COMPILER_BUILD_TRIPLE" ) . unwrap ( ) ;
92
89
let arg0 = exe ( args[ 0 ] . to_str ( ) . expect ( "only utf8 paths are supported" ) , & host) ;
93
90
if Path :: new ( & arg0) == current_exe {
94
91
args. remove ( 0 ) ;
0 commit comments