cmake: allow CURL_STATIC_CRT with UCRT VS2015+ builds

After this patch, we're back to 8.12.1, but disallowing
`CURL_STATIC_CRT=ON` with shared curl exe built with VS2013 or older.
Because those may crash. A stable reprducer is with `ENABLE_DEBUG=ON`
and calling `curl.exe -V`.

You can pass the necessary CMake and MSVC linker options manually,
to get around this condition.

Shared build with static UCRT may be crashing too, depending on
conditions. Consult the documentation about limitations of static CRT:
https://learn.microsoft.com/cpp/c-runtime-library/crt-library-features

Follow-up to 049352dd80 #16516
Follow-up to edfa537100 #16456
Ref: #16394
Closes #16522
This commit is contained in:
Viktor Szakats 2025-02-28 13:17:39 +01:00
parent 9a0767017c
commit 61407464bf
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 4 additions and 3 deletions

View file

@ -868,6 +868,7 @@ typedef
typedefed
Ubuntu
ucLinux
UCRT
UDP
UI
UID