{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1749478025,"commit_time":1749595864,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"c129d0b1a8769b352a3cf906fa0d3919b4a8ea3d","message":"GHA/windows: make MSVC jobs use MSYS2 libraries: psl, OpenSSL, H2, libssh2\n\nExtend MSVC jobs with the option to use MSYS2 binary package as DLL\ndependencies. Allow to use them alone (without vcpkg) or combined with\nvcpkg packages. This saves the trouble of building these packages from\nsource and cache them manually.\n\nThis solution requires two tricks:\n- workaround for zlib which installs a target-specific `zconf.h` that's\n  not portable between platforms and C compilers.\n- manual dependency configuration in CMake to ensure linking against\n  the MSYS2 DLLs (and not it static libs). Static libs aren't portable\n  to MSVC due to missing symbols `__chkstk_ms`, `_stack_chk_fail`,\n  `_memcpy_chk`, `_stack_chk_guard`, and potentially other issues. CMake\n  in MSVC mode, `linker.exe` and `pkg-config` pick the static libs by\n  default. To pick `.dll.a` in favour of `.a`, these tools would have\n  to be taught about this convention. An alternative is deleting static\n  libs and see if `.dll.a` are picked-up automatically.\n\nUsing MSYS2 packages adds an install step taking 15-45 seconds per job.\n\nIt allowed to:\n- re-enable libpsl for all MSVC jobs.\n- convert the Intel 64-bit job to use MSYS2 without vcpkg, enabling\n  brotli, zstd, OpenSSL 3.5.0, libssh2 (with OpenSSL cryprography) and\n  nghttp2.\n\nUsing the same technique it's possible to re-enable more features\nin MSVC builds, e.g. GnuTLS (also with H3), LibreSSL, mbedTLS, nghttp3,\nngtcp2, libssh, c-ares, gsasl, and replace vcpkg zlib, for faster runs.\nWhat's missing compared to vcpkg is BoringSSL and wolfSSL\n(the MSYS2-supplied build doesn't fit curl's requirements IIRC). These\ncould be built and cached manually.\n\nAlso:\n- add workaround for zlib (classic) which uses a generated `zconf.h`,\n  rendering the MSYS2 zlib header incompatible with MSVC.\n- set the correct `msystem` for arm64.\n- allow using MSVC without vcpkg.\n\nFollow-up to cd0ec4784c1c0f873939f33ec1a73c8739f276b9 #17089\n\nCloses #17561\n","parents":["a7e364df81bf25fd3ec2efbfda92ae6ec1345469"],"tree_hash":"a7156469ccb2dbb1622a0a03c4e3fbfdbf4f17ec"}