ICU 75.1 requires C++17 (GH-15678)

This needs to be explicitly enabled for MSVC (and probably clang on
Windows); otherwise the default is C++14, which is no longer sufficient
for ICU[1].

While the official PHP 8.4 builds for Windows do not yet use ICU 75.1,
that may change[2].  And even if not, it would be nice for custom
builds to be able to build against ICU 75.1 (or later).

Anyhow, using `std:c++17` is fine for ICU 72.1 which we are currently
using (and likely for some older ICU versions).

[1] <https://github.com/unicode-org/icu/releases/tag/release-75-1>
[2] <https://github.com/winlibs/icu4c/pulls>
This commit is contained in:
Christoph M. Becker 2024-08-31 17:01:49 +02:00 committed by GitHub
parent b3d6414b87
commit 0f8259e896
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,7 +126,7 @@ if (PHP_INTL != "no") {
ADD_FLAG("LIBS_INTL", "iculx.lib"); ADD_FLAG("LIBS_INTL", "iculx.lib");
} }
ADD_FLAG("CFLAGS_INTL", "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1"); ADD_FLAG("CFLAGS_INTL", "/std:c++17 /EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1");
} else { } else {
WARNING("intl not enabled; libraries and/or headers not found"); WARNING("intl not enabled; libraries and/or headers not found");
} }