Workaround for mingw-llvm linker (lld) misdetection
Workaround for mingw-llvm linker (lld) misdetection

llvm-mingw uses a wrapper script to inject (among other things) a
-target argument into the clang command, which breaks -Wl,--version.
This confuses Meson into thinking the linker is some unknown version of
Apple ld, which breaks builds.

This patch makes it detect and recover from the issue.

Fixes #5910

becm/meson,jpakkane/meson,mesonbuild/meson,pexip/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,jpakkane/meson,becm/meson,jpakkane/meson,becm/meson,becm/meson,pexip/meson,pexip/meson,jpakkane/meson,mesonbuild/meson,mesonbuild/meson,mesonbuild/meson,becm/meson,jpakkane/meson,QuLogic/meson,becm/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,mesonbuild/meson,jpakkane/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,QuLogic/meson,pexip/meson,pexip/meson,mesonbuild/meson,becm/meson,QuLogic/meson,jpakkane/meson,becm/meson,pexip/meson,mesonbuild/meson,QuLogic/meson,jpakkane/meson,becm/meson,pexip/meson,becm/meson