aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-03-12 11:01:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-03-12 11:01:08 +0200
commite031550cf9f15bd838517471604d058d2634687e (patch)
tree218fa0c67cf5472d58cb2e97750f442e8f62d69e
parent837a110d52aa22e6f5f3c13048dd48b9026e6664 (diff)
Recognize MSVC 16 (19.20) runtime as 14.2
-rw-r--r--build2/cc/guess.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx
index 51aa3e7..5fa0604 100644
--- a/build2/cc/guess.cxx
+++ b/build2/cc/guess.cxx
@@ -1576,11 +1576,18 @@ namespace build2
// Mapping of compiler versions to runtime versions:
//
- // Note that VC15 has runtime version 14.1 but the DLLs are still
+ // Note that VC 15 has runtime version 14.1 but the DLLs are still
// called *140.dll (they are said to be backwards-compatible).
//
- // year ver cl.exe crt/dll
+ // And VC 16 seems to have the runtime version 14.1 (and not 14.2,
+ // as one might expect; DLLs are still *140.dll but there are now _1
+ // and _2 variants for, say, msvcp140.dll). We will, however, call
+ // it 14.2 (which is the version of the "toolset") in our target
+ // triplet.
//
+ // year ver cl crt/dll
+ //
+ // 2019 16.0 19.20 14.2/140
// 2017 15.9 19.16 14.1/140
// 2017 15.8 19.15 14.1/140
// 2017 15.7 19.14 14.1/140
@@ -1596,7 +1603,8 @@ namespace build2
// 2005 8 14.00 8.0/80
// 2003 7.1 13.10 7.1/71
//
- /**/ if (v.major == 19 && v.minor >= 10) t += "14.1";
+ /**/ if (v.major == 19 && v.minor >= 20) t += "14.2";
+ else if (v.major == 19 && v.minor >= 10) t += "14.1";
else if (v.major == 19 && v.minor == 0) t += "14.0";
else if (v.major == 18 && v.minor == 0) t += "12.0";
else if (v.major == 17 && v.minor == 0) t += "11.0";