My project doesn't build since Rust 1.46.0, it builds fine with Rust 1.45.0 (and 1.44.0).
I've found that the linker (which is link.exe on Windows) is invoked with /WHOLEARCHIVE:somelib.lib where somelib.lib is the external static library linked with the project (via cargo:rustc-link-lib=static=somelib.lib). That means, before the linker is called with:
Hmm... it's weird that the default linking behaviour was changed before static-nobundle is stabilized.
A workaround would be to drop the static= and go with the default (which is dylib). On a MSVC linker this should currently amount to the same as the old static behaviour.
cl
Compilateur d'optimisation Microsoft (R) C/C++ version 19.26.28806 pour x64
Copyright (C) Microsoft Corporation. Tous droits réservés.
link
Microsoft (R) Incremental Linker Version 14.26.28806.0
Copyright (C) Microsoft Corporation. All rights reserved.
So cl is of 19.26.28806 and link is of 14.26.28806.0.