aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-11 16:12:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-11 16:12:19 +0200
commit062c2ecb80226e57e631c9fd7007646658375376 (patch)
tree6e8b8ebb5136d602e44d0e9989a1b5c8d7c85c9e /libbuild2
parent8a7f0c22be9afb320749c7f010cd4189862a8bb6 (diff)
Update Apple to vanilla Clang version mapping for Apple Clang 13.0.0
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/guess.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index 098dc86..ff06c5f 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -2440,7 +2440,9 @@ namespace build2
//
// Specifically, we now look in the libc++'s __config file for the
// _LIBCPP_VERSION and use the previous version as a conservative
- // estimate.
+ // estimate (note that there could be multiple __config files with
+ // potentially different versions so compile with -v to see which one
+ // gets picked up).
//
// Note that this is Apple Clang version and not XCode version.
//
@@ -2460,12 +2462,13 @@ namespace build2
// 11.0.3 -> 8.0 (yes, seriously!)
// 12.0.0 -> 9.0
// 12.0.5 -> 10.0 (yes, seriously!)
+ // 13.0.0 -> 11.0
//
uint64_t mj (var_ver->major);
uint64_t mi (var_ver->minor);
uint64_t pa (var_ver->patch);
- if (mj > 12) {mj = 10; mi = 0;}
+ if (mj >= 13) {mj = 11; mi = 0;}
else if (mj == 12 && (mi > 0 || pa >= 5)) {mj = 10; mi = 0;}
else if (mj == 12) {mj = 9; mi = 0;}
else if (mj == 11 && (mi > 0 || pa >= 3)) {mj = 8; mi = 0;}