File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,14 @@ fn compile_probe() -> Option<ExitStatus> {
7070 let probefile = Path :: new ( & out_dir) . join ( "probe.rs" ) ;
7171 fs:: write ( & probefile, PROBE ) . ok ( ) ?;
7272
73- // Make sure to pick up Cargo rustc configuration.
74- let mut cmd = if let Some ( wrapper) = env:: var_os ( "RUSTC_WRAPPER" ) {
73+ // Make sure to pick up Cargo rustc configuration, while working around
74+ // <https://github.com/rust-lang/rust-analyzer/issues/12973>.
75+ let wrapper = env:: var_os ( "RUSTC_WRAPPER" ) . filter ( |w| {
76+ let wrapper_filename = Path :: new ( w) . file_name ( ) . unwrap_or_default ( ) ;
77+ // Ignore wrappers with these filenames.
78+ wrapper_filename != "rust-analyzer" && wrapper_filename != "rust-analyzer.exe"
79+ } ) ;
80+ let mut cmd = if let Some ( wrapper) = wrapper {
7581 let mut cmd = Command :: new ( wrapper) ;
7682 // The wrapper's first argument is supposed to be the path to rustc.
7783 cmd. arg ( rustc) ;
You can’t perform that action at this time.
0 commit comments