mirror of
https://github.com/mesonbuild/meson.git
synced 2026-08-09 09:12:24 +00:00
cpp: handle Apple Clang deprecation of hardening macro for old versions too
a16ec8b0fb 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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user