diff --git a/src/cargo/core/compiler/build_context/mod.rs b/src/cargo/core/compiler/build_context/mod.rs index 1a5c660605e..324c052ad24 100644 --- a/src/cargo/core/compiler/build_context/mod.rs +++ b/src/cargo/core/compiler/build_context/mod.rs @@ -51,10 +51,7 @@ impl<'a, 'cfg> BuildContext<'a, 'cfg> { units: &'a UnitInterner<'a>, extra_compiler_args: HashMap, Vec>, ) -> CargoResult> { - let mut rustc = config.load_global_rustc(Some(ws))?; - if let Some(wrapper) = &build_config.primary_unit_rustc { - rustc.set_wrapper(wrapper.clone()); - } + let rustc = config.load_global_rustc(Some(ws))?; let host_config = TargetConfig::new(config, &rustc.host)?; let target_config = match build_config.requested_target.as_ref() {