Skip to content

Commit 14c2300

Browse files
thesamesameli-schwartz
authored andcommitted
cpp: handle Apple Clang deprecation of hardening macro for old versions too
a16ec8b changed the threshold to 17 for Apple Clang, but it needs to be 16 instead. Bug: #14440 Closes: #14856
1 parent e99253c commit 14c2300

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mesonbuild/compilers/cpp.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@ class AppleClangCPPCompiler(AppleCompilerMixin, AppleCPPStdsMixin, ClangCPPCompi
349349
def is_libcpp_enable_assertions_deprecated(self) -> bool:
350350
# Upstream libc++ deprecated _LIBCPP_ENABLE_ASSERTIONS
351351
# in favor of _LIBCPP_HARDENING_MODE from version 18 onwards,
352-
# but Apple Clang 17's libc++ has back-ported that change.
353-
# See: https://github.com/mesonbuild/meson/issues/14440
354-
return version_compare(self.version, ">=17")
352+
# but Apple Clang 16's libc++ has back-ported that change.
353+
# See: https://github.com/mesonbuild/meson/issues/14440 and
354+
# https://github.com/mesonbuild/meson/issues/14856
355+
return version_compare(self.version, ">=16")
355356

356357

357358
class EmscriptenCPPCompiler(EmscriptenMixin, ClangCPPCompiler):

0 commit comments

Comments
 (0)