3535//! [`drain_the_queue`]: crate::core::compiler::job_queue
3636//! ["Cargo Target"]: https://doc.rust-lang.org/nightly/cargo/reference/cargo-targets.html
3737
38- use cargo_platform:: Cfg ;
3938use std:: collections:: { HashMap , HashSet } ;
4039use std:: hash:: { Hash , Hasher } ;
4140use std:: sync:: Arc ;
@@ -439,7 +438,6 @@ pub fn create_bcx<'a, 'gctx>(
439438 & units,
440439 & scrape_units,
441440 host_kind_requested. then_some ( explicit_host_kind) ,
442- & target_data,
443441 ) ;
444442
445443 let mut extra_compiler_args = HashMap :: new ( ) ;
@@ -579,7 +577,6 @@ fn rebuild_unit_graph_shared(
579577 roots : & [ Unit ] ,
580578 scrape_units : & [ Unit ] ,
581579 to_host : Option < CompileKind > ,
582- target_data : & RustcTargetData < ' _ > ,
583580) -> ( Vec < Unit > , Vec < Unit > , UnitGraph ) {
584581 let mut result = UnitGraph :: new ( ) ;
585582 // Map of the old unit to the new unit, used to avoid recursing into units
@@ -596,7 +593,6 @@ fn rebuild_unit_graph_shared(
596593 root,
597594 false ,
598595 to_host,
599- target_data,
600596 )
601597 } )
602598 . collect ( ) ;
@@ -623,7 +619,6 @@ fn traverse_and_share(
623619 unit : & Unit ,
624620 unit_is_for_host : bool ,
625621 to_host : Option < CompileKind > ,
626- target_data : & RustcTargetData < ' _ > ,
627622) -> Unit {
628623 if let Some ( new_unit) = memo. get ( unit) {
629624 // Already computed, no need to recompute.
@@ -641,7 +636,6 @@ fn traverse_and_share(
641636 & dep. unit ,
642637 dep. unit_for . is_for_host ( ) ,
643638 to_host,
644- target_data,
645639 ) ;
646640 new_dep_unit. hash ( & mut dep_hash) ;
647641 UnitDep {
@@ -665,13 +659,8 @@ fn traverse_and_share(
665659 _ => unit. kind ,
666660 } ;
667661
668- let cfg = target_data. cfg ( unit. kind ) ;
669- let is_target_windows_msvc = cfg. contains ( & Cfg :: Name ( "windows" . to_string ( ) ) )
670- && cfg. contains ( & Cfg :: KeyPair ( "target_env" . to_string ( ) , "msvc" . to_string ( ) ) ) ;
671662 let mut profile = unit. profile . clone ( ) ;
672- // For MSVC, rustc currently treats -Cstrip=debuginfo same as -Cstrip=symbols, which causes
673- // this optimization to also remove symbols and thus break backtraces.
674- if profile. strip . is_deferred ( ) && !is_target_windows_msvc {
663+ if profile. strip . is_deferred ( ) {
675664 // If strip was not manually set, and all dependencies of this unit together
676665 // with this unit have debuginfo turned off, we enable debuginfo stripping.
677666 // This will remove pre-existing debug symbols coming from the standard library.
0 commit comments