summaryrefslogtreecommitdiff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-07 20:10:35 +0000
committerbors <bors@rust-lang.org>2023-05-07 20:10:35 +0000
commit2013813b65016b39d456a12e3b0a90366e9fb5e3 (patch)
tree6b153b64eccbb0078d93f2c44cd046a1e426b6cb /compiler/rustc_codegen_ssa/src
parentcc38d9fe09fc068e5b070b31f4bd2f211ca5c067 (diff)
parentc11cc105588ad2da8cf33a948ba5dee78fd95af6 (diff)
downloadrust-beta.tar.gz
Auto merge of #111290 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrumbeta
[beta] backport This PR backports: - #111015: Remove wrong assertion in match checking. - #110917: only error combining +whole-archive and +bundle for rlibs - #111201: bootstrap: add .gitmodules to the sources r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 02e21e74fad..eecfe13bb3e 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -349,7 +349,10 @@ fn link_rlib<'a>(
let NativeLibKind::Static { bundle: None | Some(true), whole_archive } = lib.kind else {
continue;
};
- if whole_archive == Some(true) && !codegen_results.crate_info.feature_packed_bundled_libs {
+ if whole_archive == Some(true)
+ && flavor == RlibFlavor::Normal
+ && !codegen_results.crate_info.feature_packed_bundled_libs
+ {
sess.emit_err(errors::IncompatibleLinkingModifiers);
}
if flavor == RlibFlavor::Normal && let Some(filename) = lib.filename {