summaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/cpp.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index d550e2091..57da4dfae 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -312,9 +312,6 @@ class ClangCPPCompiler(_StdCPPLibMixin, ClangCPPStds, ClangCompiler, CPPCompiler
return libs
return []
- def is_libcpp_enable_assertions_deprecated(self) -> bool:
- return version_compare(self.version, ">=18")
-
def get_assert_args(self, disable: bool, env: 'Environment') -> T.List[str]:
if disable:
return ['-DNDEBUG']
@@ -326,13 +323,8 @@ class ClangCPPCompiler(_StdCPPLibMixin, ClangCPPStds, ClangCompiler, CPPCompiler
if self.language_stdlib_provider(env) == 'stdc++':
return ['-D_GLIBCXX_ASSERTIONS=1']
- else:
- if self.is_libcpp_enable_assertions_deprecated():
- return ['-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST']
- elif version_compare(self.version, '>=15'):
- return ['-D_LIBCPP_ENABLE_ASSERTIONS=1']
- return []
+ return ['-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST']
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
args = super().get_pch_use_args(pch_dir, header)
@@ -347,13 +339,7 @@ class ArmLtdClangCPPCompiler(ClangCPPCompiler):
class AppleClangCPPCompiler(AppleCompilerMixin, AppleCPPStdsMixin, ClangCPPCompiler):
- 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 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")
+ pass
class EmscriptenCPPCompiler(EmscriptenMixin, ClangCPPCompiler):
@@ -547,8 +533,6 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCPPStds, GnuCompiler, CPPCompiler):
# an experimental configure arg to expose that.
if version_compare(self.version, '>=18'):
return ['-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST']
- elif version_compare(self.version, '>=15'):
- return ['-D_LIBCPP_ENABLE_ASSERTIONS=1']
return []