From 7d34ed7515d0122178ee9cbccee0b60001b4fd47 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 4 Dec 2017 15:44:04 +0200 Subject: Remap Clang on Windows target triplet to that of MSVC --- build2/cc/module.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'build2/cc/module.cxx') 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 (); -- cgit v1.1