aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-06-22 04:51:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-06-22 04:51:05 +0200
commited6713d2693cf6797dc8928aa987f6bc61cb555c (patch)
treebfbb82cec02edfc09a5b94404b0585b0f0e6e236 /libbuild2
parenta7743090e2b94c5eb1afb21eb9134dbc2a3c9873 (diff)
Omit -Wno-gnu-line-marker for Apple Clang 14.0.3
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))