--- rustc-1.87.0-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig +++ rustc-1.87.0-src/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1808,6 +1808,9 @@ crate_type: CrateType, linker: &Path, ) -> LinkSelfContainedComponents { + if sess.target.options.os == "windows" && sess.target.options.env == "gnu" { + return LinkSelfContainedComponents::empty(); + } // Turn the backwards compatible bool values for `self_contained` into fully inferred // `LinkSelfContainedComponents`. let self_contained =