VS 17 == MSVC v143 == Visual Studio 2022 == cl 19.3x

This commit is contained in:
Christoph M. Becker 2022-01-08 19:57:54 +01:00
parent 51eec5086f
commit 9e80947e34
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
2 changed files with 5 additions and 3 deletions

View file

@ -3101,9 +3101,11 @@ function toolset_get_compiler_name(short)
version = probe_binary(PHP_CL).substr(0, 5).replace('.', ''); version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');
if (version >= 1930) { if (version >= 1940) {
return name; return name;
} if (version >= 1920) { } else if (version >= 1930) {
name = short ? "VS17" : "Visual C++ 2022";
} else if (version >= 1920) {
/* NOTE - VS is intentional. Due to changes in recent Visual Studio /* NOTE - VS is intentional. Due to changes in recent Visual Studio
versioning scheme referring to the exact VC++ version is versioning scheme referring to the exact VC++ version is
hardly predictable. From this version on, it refers to hardly predictable. From this version on, it refers to

View file

@ -448,7 +448,7 @@ static zend_always_inline BOOL is_compatible(HMODULE handle, BOOL is_smaller, ch
DWORD minor = pNTHeader->OptionalHeader.MinorLinkerVersion; DWORD minor = pNTHeader->OptionalHeader.MinorLinkerVersion;
#if PHP_LINKER_MAJOR == 14 #if PHP_LINKER_MAJOR == 14
/* VS 2015, 2017 and 2019 are binary compatible, but only forward compatible. /* VS 2015, 2017, 2019 and 2022 are binary compatible, but only forward compatible.
It should be fine, if we load a module linked with an older one into It should be fine, if we load a module linked with an older one into
the core linked with the newer one, but not the otherway round. the core linked with the newer one, but not the otherway round.
Analogously, it should be fine, if a PHP build linked with an older version Analogously, it should be fine, if a PHP build linked with an older version