aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-04 15:44:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-04 15:44:04 +0200
commit7d34ed7515d0122178ee9cbccee0b60001b4fd47 (patch)
treee0145df5c2efb669942fd19d6a6851764986881e /build2/cc/module.cxx
parentd503f45ab1b5ee91425dc89cd1b72e7239fa5f10 (diff)
Remap Clang on Windows target triplet to that of MSVC
Diffstat (limited to 'build2/cc/module.cxx')
-rw-r--r--build2/cc/module.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/build2/cc/module.cxx b/build2/cc/module.cxx
index 196c2ce..7278586 100644
--- a/build2/cc/module.cxx
+++ b/build2/cc/module.cxx
@@ -142,6 +142,23 @@ namespace build2
}
}
+ // For some compilers we have to remap the target to something more
+ // appropriate.
+ //
+ if (tt.system == "windows-msvc") // Clang on Windows targeting MSVC.
+ {
+ // Remap to the same triplet as used for MSVC.
+ //
+ // @@ This should probably be done in guess(), especially since we may
+ // need to extra extra info from the compiler (like the runtime
+ // version). Perhaps have original_target in compiler_info (so can
+ // print it in report below)?
+ //
+ tt.vendor = "microsoft";
+ tt.system = "win32-msvc";
+ tt.version = "14.1"; //@@ TMP hardcoded.
+ }
+
// Assign value to variables that describe the compiler.
//
rs.assign (x_id) = ci.id.string ();