From 92b60413e23109fe9c32a8b82ddd1df0d198ac05 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 11 Mar 2025 10:08:25 +0000 Subject: compilers: cpp: add comment wrt GCC -stdlib=libc++ case It's not obvious so add a comment, lest someone think handling the case is a bug. --- mesonbuild/compilers/cpp.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mesonbuild/compilers') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index b57cbec62..d550e2091 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -543,6 +543,8 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCPPStds, GnuCompiler, CPPCompiler): if self.language_stdlib_provider(env) == 'stdc++': return ['-D_GLIBCXX_ASSERTIONS=1'] else: + # One can use -stdlib=libc++ with GCC, it just (as of 2025) requires + # 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'): -- cgit v1.2.3