diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 878b333580e1c..d35c3b6bb189e 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1763,10 +1763,6 @@ fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { // Returns true if linker is located within sysroot fn detect_self_contained_mingw(sess: &Session, linker: &Path) -> bool { - // Assume `-C linker=rust-lld` as self-contained mode - if linker == Path::new("rust-lld") { - return true; - } let linker_with_extension = if cfg!(windows) && linker.extension().is_none() { linker.with_extension("exe") } else {