File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -495,10 +495,13 @@ impl<'a> Builder<'a> {
495495 if let Some ( target_linker) = self . build . linker ( target) {
496496 cargo. env ( "RUSTC_TARGET_LINKER" , target_linker) ;
497497 }
498- cargo. env ( "RUSTC_DEBUGINFO" , self . config . rust_debuginfo . to_string ( ) )
499- . env ( "RUSTC_DEBUGINFO_LINES" , self . config . rust_debuginfo_lines . to_string ( ) ) ;
500498
501499 if mode != Mode :: Tool {
500+ // Tools don't get debuginfo right now, e.g. cargo and rls don't
501+ // get compiled with debuginfo.
502+ // Adding debuginfo increases their sizes by a factor of 3-4.
503+ cargo. env ( "RUSTC_DEBUGINFO" , self . config . rust_debuginfo . to_string ( ) ) ;
504+ cargo. env ( "RUSTC_DEBUGINFO_LINES" , self . config . rust_debuginfo_lines . to_string ( ) ) ;
502505 cargo. env ( "RUSTC_FORCE_UNSTABLE" , "1" ) ;
503506
504507 // Currently the compiler depends on crates from crates.io, and
You can’t perform that action at this time.
0 commit comments