From 9cf556dca9e4fb731035a51e75974c78d52295ce Mon Sep 17 00:00:00 2001 From: Daniel Sommermann Date: Mon, 1 Aug 2022 11:47:32 -0700 Subject: Fix backwards-compatibility check for tests with `+whole-archive` Fixes #100066 --- compiler/rustc_codegen_ssa/src/back/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 13a7b6be947..326dce8011e 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2267,7 +2267,7 @@ fn add_local_native_libraries( // 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. - || (bundle != Some(false) && sess.opts.test) + || (whole_archive == None && bundle != Some(false) && sess.opts.test) { cmd.link_whole_staticlib( name, -- cgit 1.4.1-3-g733a5