Ninjia builder fails on windows after CMake upgrade from 3.20.5 to 3.21.1
Hello, I am an occasional contributor to darktable devs community, primarily on its Windows version. Upon updating my MSYS2 system yesterday, which upgraded CMake
[2021-08-06T17:22:51+0200] [ALPM] upgraded mingw-w64-x86_64-cmake (3.20.5-2 -> 3.21.1-1)
darktable build fails with the following error
[59/733] Linking C static library bin\external\libxcf\libxcf.a
FAILED: bin/external/libxcf/libxcf.a
cmd.exe /C "cd . && C:\msys64\mingw64\bin\cmake.exe -E rm -f bin\external\libxcf\libxcf.a && C:\msys64\mingw64\bin\ar.exe qc bin\external\libxcf\libxcf.a -Wl,--no-as-needed bin/external/libxcf/CMakeFiles/xcf.dir/xcf.c.obj bin/external/libxcf/CMakeFiles/xcf.dir/xcf_names.c.obj && C:\msys64\mingw64\bin\ranlib.exe bin\external\libxcf\libxcf.a && cd ."
C:\msys64\mingw64\bin\ar.exe: invalid option -- W
For some reason, linker args are passed to ar.
Note that Ninja has not been upgraded on my system in recent times.
Also, downgrading CMake to 3.20.5 solves the issue.