diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-11 07:52:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-11 08:45:57 +0200 |
commit | 2fb22e7b4aedcb62bb3a4d868c311237f3537a2f (patch) | |
tree | 64f0ca37c91a78091f0daa3a53eded8f7996e867 /libbuild2/cc/guess.hxx | |
parent | cc57f3a59ed7e19d663ed77654de2a5e16e16875 (diff) |
Add support for clang-cl
The compiler type is `msvc`, variant `clang`.
Diffstat (limited to 'libbuild2/cc/guess.hxx')
-rw-r--r-- | libbuild2/cc/guess.hxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libbuild2/cc/guess.hxx b/libbuild2/cc/guess.hxx index bf6a5e6..d9172dc 100644 --- a/libbuild2/cc/guess.hxx +++ b/libbuild2/cc/guess.hxx @@ -24,6 +24,7 @@ namespace build2 // clang Vanilla Clang clang/clang++ // clang-apple Apple Clang clang/clang++ and the gcc/g++ "alias" // msvc Microsoft cl.exe + // msvc-clang Clang in the cl compatibility mode (clang-cl) // icc Intel icc/icpc // // Note that the user can provide a custom id with one of the predefined @@ -107,14 +108,23 @@ namespace build2 // straightforward, PATCH may be empty and BUILD can contain pretty much // anything (including spaces). // + // All compilers of the same type follow the same versioning scheme + // (normally of their variant-less primary member): + // // gcc A.B.C[ ...] {A, B, C, ...} // clang A.B.C[( |-)...] {A, B, C, ...} - // clang-apple A.B[.C] ... {A, B, C, ...} // icc A.B[.C.D] ... {A, B, C, D ...} // msvc A.B.C[.D] {A, B, C, D} // - // Note that the clang-apple version is a custom Apple version and does - // not correspond to the vanilla clang version. + // A compiler variant may also have a variant version: + // + // clang-apple A.B[.C] ... {A, B, C, ...} + // msvc-clang A.B.C[( |-)...] {A, B, C, ...} (native Clang version) + // + // Note that the clang-apple variant version is a custom Apple version + // that doesn't correspond to the vanilla Clang version nor is the mapping + // documented by Apple. We try to map it conservatively to the best of our + // abilities. // struct compiler_version { @@ -168,6 +178,7 @@ namespace build2 compiler_id id; compiler_class class_; compiler_version version; + optional<compiler_version> variant_version; string signature; string checksum; string target; |