aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/compile-rule.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index efe712f..fa46332 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -5285,7 +5285,8 @@ namespace build2
{
// See below for details.
//
- if (ctype == compiler_type::clang && cmaj >= 15)
+ if (ctype == compiler_type::clang &&
+ cmaj >= (cvariant != "apple" ? 15 : 16))
{
if (find_options ({"-pedantic", "-pedantic-errors",
"-Wpedantic", "-Werror=pedantic"},
@@ -7638,7 +7639,13 @@ namespace build2
// (llvm-project issue 63284). So we suppress this warning unless
// compiling from source.
//
- if (ctype == compiler_type::clang && cmaj >= 15)
+ // In Apple Clang this warning/option are absent in 14.0.3 (which
+ // is said to be based on vanilla Clang 15.0.5) for some reason
+ // (let's hope it's because they patched it out rather than due to
+ // a misleading __LIBCPP_VERSION value).
+ //
+ if (ctype == compiler_type::clang &&
+ cmaj >= (cvariant != "apple" ? 15 : 16))
{
if (find_options ({"-pedantic", "-pedantic-errors",
"-Wpedantic", "-Werror=pedantic"}, args))