aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-17 07:32:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-17 07:32:52 +0200
commitaf952074c34ba0e44ce76e04a8bcd41d7732e262 (patch)
tree5962f8556ec8cecfda0175fb399da212b238fd36 /libbuild2/cc
parent495de53eb379eff3cf998b210f7472619741e037 (diff)
Undo remap of Apple Clang 14.0.3 and 15.0.0 to vanilla Clang 14.0 and 15.0
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/guess.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index 474185a..066d790 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -2538,7 +2538,9 @@ namespace build2
// the Apple's version (that is presumably based on it) still does. So
// the theory here is that Apple upgrades to newer libc++ while
// keeping the old compiler. Which means we must be more conservative
- // and assume something like 15.0.6 is still 14-based.
+ // and assume something like 15.0.6 is still 14-based. But then you
+ // get -Wunqualified-std-cast-call in 14, which was supposedly only
+ // introduced in Clang 15. So maybe not.
//
// Note that this is Apple Clang version and not XCode version.
//
@@ -2561,15 +2563,15 @@ namespace build2
// 13.0.0 -> 11.0
// 13.1.6 -> 12.0
// 14.0.0 -> 12.0 (__LIBCPP_VERSION=130000)
- // 14.0.3 -> 14.0 (__LIBCPP_VERSION=150006)
- // 15.0.0 -> 15.0 (__LIBCPP_VERSION=160002)
+ // 14.0.3 -> 15.0 (__LIBCPP_VERSION=150006)
+ // 15.0.0 -> 16.0 (__LIBCPP_VERSION=160002)
//
uint64_t mj (var_ver->major);
uint64_t mi (var_ver->minor);
uint64_t pa (var_ver->patch);
- if (mj >= 15) {mj = 15; mi = 0; pa = 0;}
- else if (mj == 14 && (mi > 0 || pa >= 3)) {mj = 14; mi = 0; pa = 0;}
+ if (mj >= 15) {mj = 16; mi = 0; pa = 0;}
+ else if (mj == 14 && (mi > 0 || pa >= 3)) {mj = 15; mi = 0; pa = 0;}
else if (mj == 14 || (mj == 13 && mi >= 1)) {mj = 12; mi = 0; pa = 0;}
else if (mj == 13) {mj = 11; mi = 0; pa = 0;}
else if (mj == 12 && (mi > 0 || pa >= 5)) {mj = 10; mi = 0; pa = 0;}