aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/guess.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-07-20 06:23:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-07-20 06:23:45 +0200
commite959ed4fc854394b13ea1d82b94ccc486e05ee46 (patch)
tree20650c9cb8ef893687e937eef1e147cebcb4889d /libbuild2/cc/guess.cxx
parentcf8f4d66330399a7df8eb243a6e469df66f5f830 (diff)
Map Apple Clang version 12.0.5 to vanilla Clang 10.0.0
Diffstat (limited to 'libbuild2/cc/guess.cxx')
-rw-r--r--libbuild2/cc/guess.cxx35
1 files changed, 19 insertions, 16 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index 605e588..b7fd28c 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -2457,28 +2457,31 @@ namespace build2
// 9.1.0 -> 5.0
// 10.0.0 -> 6.0
// 11.0.0 -> 7.0
- // 11.0.3 -> 8.0
+ // 11.0.3 -> 8.0 (yes, seriously!)
// 12.0.0 -> 9.0
+ // 12.0.5 -> 10.0 (yes, seriously!)
//
uint64_t mj (var_ver->major);
uint64_t mi (var_ver->minor);
uint64_t pa (var_ver->patch);
- if (mj >= 12) {mj = 9; mi = 0;}
- else if (mj == 11 && (mi > 0 || pa >= 3)) {mj = 8; mi = 0;}
- else if (mj == 11) {mj = 7; mi = 0;}
- else if (mj == 10) {mj = 6; mi = 0;}
- else if (mj == 9 && mi >= 1) {mj = 5; mi = 0;}
- else if (mj == 9) {mj = 4; mi = 0;}
- else if (mj == 8) {mj = 3; mi = 9;}
- else if (mj == 7 && mi >= 3) {mj = 3; mi = 8;}
- else if (mj == 7) {mj = 3; mi = 7;}
- else if (mj == 6 && mi >= 1) {mj = 3; mi = 5;}
- else if (mj == 6) {mj = 3; mi = 4;}
- else if (mj == 5 && mi >= 1) {mj = 3; mi = 3;}
- else if (mj == 5) {mj = 3; mi = 2;}
- else if (mj == 4 && mi >= 2) {mj = 3; mi = 1;}
- else {mj = 3; mi = 0;}
+ if (mj > 12) {mj = 10; 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;}
+ else if (mj == 11) {mj = 7; mi = 0;}
+ else if (mj == 10) {mj = 6; mi = 0;}
+ else if (mj == 9 && mi >= 1) {mj = 5; mi = 0;}
+ else if (mj == 9) {mj = 4; mi = 0;}
+ else if (mj == 8) {mj = 3; mi = 9;}
+ else if (mj == 7 && mi >= 3) {mj = 3; mi = 8;}
+ else if (mj == 7) {mj = 3; mi = 7;}
+ else if (mj == 6 && mi >= 1) {mj = 3; mi = 5;}
+ else if (mj == 6) {mj = 3; mi = 4;}
+ else if (mj == 5 && mi >= 1) {mj = 3; mi = 3;}
+ else if (mj == 5) {mj = 3; mi = 2;}
+ else if (mj == 4 && mi >= 2) {mj = 3; mi = 1;}
+ else {mj = 3; mi = 0;}
ver = compiler_version {
to_string (mj) + '.' + to_string (mi) + ".0",