For MinGW targets, we distinguish between an explicitly shared unwinder library (requested via -shared-libgcc), an explicitly static one (requested via -static-libgcc or -static) and the default case (which just passes -lunwind to the linker, which will pick either shared or static depending on what's available, with the normal linker logic).
This makes the implicit default case (as added in D79995) actually work as it was intended, when using the g++ driver (which is the main usecase for libunwind as far as I know).