From 14c2300ddefcb5d92f099bd8661ee8edd33cc73a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 31 Jul 2025 17:25:14 +0100 Subject: cpp: handle Apple Clang deprecation of hardening macro for old versions too a16ec8b0fb6d7035b669a13edd4d97ff0c307a0b changed the threshold to 17 for Apple Clang, but it needs to be 16 instead. Bug: https://github.com/mesonbuild/meson/issues/14440 Closes: https://github.com/mesonbuild/meson/issues/14856 --- mesonbuild/compilers/cpp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index ed8d1cf05..fa032ec79 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -349,9 +349,10 @@ class AppleClangCPPCompiler(AppleCompilerMixin, AppleCPPStdsMixin, ClangCPPCompi def is_libcpp_enable_assertions_deprecated(self) -> bool: # Upstream libc++ deprecated _LIBCPP_ENABLE_ASSERTIONS # in favor of _LIBCPP_HARDENING_MODE from version 18 onwards, - # but Apple Clang 17's libc++ has back-ported that change. - # See: https://github.com/mesonbuild/meson/issues/14440 - return version_compare(self.version, ">=17") + # but Apple Clang 16's libc++ has back-ported that change. + # See: https://github.com/mesonbuild/meson/issues/14440 and + # https://github.com/mesonbuild/meson/issues/14856 + return version_compare(self.version, ">=16") class EmscriptenCPPCompiler(EmscriptenMixin, ClangCPPCompiler): -- cgit v1.2.3