{"_id":"q-en-rust-6bfd1043e57920f5ebdb2f39053599f3a97cc146682b8dfafd0f928d39f82647","text":"I am attempting to use the () syntax to control how my test binary is compiled. I have created a repro at In , I tell to link 2 static libraries, one with (+whole-archive) and one without (-whole-archive). I add a nonsense link argument so I can inspect the produced link line. I expect to see linked without whole archive. Instead, I see both and libraries linked with --whole-archive: This may be related to the default documented . When I use nightly and specify it works as expected: However, I cannot use the nightly toolchain, so I cannot use , and seems inappropriate for a final binary crate types like cdylib, staticlib, and executables anyway. Tested with 1.62.1 stable and 1.64 nightly. Possibly related issues: ,\nThis is a bug introduced in The backward compatibility condition should look like and not .\nCould you submit a PR with this fix? (We can backport it to beta if it's done in time.)\nSure, I'll create a PR. I'm not sure what tests to include, however. I had been looking at that exact code and almost submitted a PR earlier, but I wasn't sure about the whole context of that code and all the compatibility needs.\nYou can try adding a test case with to . One with and , and another with and without any (the compatibility case)."} {"_id":"q-en-rust-b9bac5eeea90d943d4c64a4113c95a2330a5912785a3a86724f8233e15b7e0db","text":": and then if I increase the recursion limit enough... adding a backtrace gives nothing new, however, compiling on nightly gives the following: