summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-03-11 10:08:25 +0000
committerEli Schwartz <eschwartz93@gmail.com>2025-10-31 01:24:46 -0400
commit92b60413e23109fe9c32a8b82ddd1df0d198ac05 (patch)
treee5456f24371300545d5a063e2f218ef078626503 /mesonbuild/compilers
parent4f43a402504aa57ffa3f7b6091f5fdccfd2a3000 (diff)
downloadmeson-92b60413e23109fe9c32a8b82ddd1df0d198ac05.tar.gz
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.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/cpp.py2
1 files changed, 2 insertions, 0 deletions
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'):