diff options
| author | bors <bors@rust-lang.org> | 2024-08-10 18:57:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-10 18:57:58 +0000 |
| commit | 04dff01740de7477013ef810e2639ab70042412a (patch) | |
| tree | cf76dc08f9e802142fbef04a63669c454be02817 /compiler/rustc_codegen_ssa/src | |
| parent | 04ba50e8233042f810206c2cd18aace50961e247 (diff) | |
| parent | 3d2d7cfe18aa19c4827d264cd4259125ed922224 (diff) | |
| download | rust-04dff01740de7477013ef810e2639ab70042412a.tar.gz rust-04dff01740de7477013ef810e2639ab70042412a.zip | |
Auto merge of #128400 - petrochenkov:nowhole3, r=bjorn3
linker: Remove the "`--whole-archive` in test mode" backcompat hack Fixes https://github.com/rust-lang/rust/issues/116910.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 45a92fd03d5..7bad9d33e7d 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2646,16 +2646,7 @@ fn add_native_libs_from_crate( NativeLibKind::Static { bundle, whole_archive } => { if link_static { let bundle = bundle.unwrap_or(true); - let whole_archive = whole_archive == Some(true) - // Backward compatibility case: this can be a rlib (so `+whole-archive` - // cannot be added explicitly if necessary, see the error in `fn link_rlib`) - // compiled as an executable due to `--test`. Use whole-archive implicitly, - // like before the introduction of native lib modifiers. - || (whole_archive == None - && bundle - && cnum == LOCAL_CRATE - && sess.is_test_crate()); - + let whole_archive = whole_archive == Some(true); if bundle && cnum != LOCAL_CRATE { if let Some(filename) = lib.filename { // If rlib contains native libs as archives, they are unpacked to tmpdir. |
