aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-04 14:42:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-04 14:42:31 +0200
commitd503f45ab1b5ee91425dc89cd1b72e7239fa5f10 (patch)
treebaa65143bca4717064685fa98bffec0fd8e60e9d
parent7c3eada02a3a22ff109ef0631e75586308ab2587 (diff)
Improve cc/bin target mismatch diagnostics
-rw-r--r--build2/bin/init.cxx2
-rw-r--r--build2/cc/init.cxx10
2 files changed, 8 insertions, 4 deletions
diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx
index e145a23..ef4b3df 100644
--- a/build2/bin/init.cxx
+++ b/build2/bin/init.cxx
@@ -223,7 +223,7 @@ namespace build2
auto p (omitted (rs, var));
lookup l (p.first);
- // Then see if there is a config hint (e.g., from the C++ module).
+ // Then see if there is a config hint (e.g., from the cc module).
//
bool hint (false);
if (!l)
diff --git a/build2/cc/init.cxx b/build2/cc/init.cxx
index 7a3e99e..b2cb2b3 100644
--- a/build2/cc/init.cxx
+++ b/build2/cc/init.cxx
@@ -280,9 +280,13 @@ namespace build2
const auto& bt (cast<target_triplet> (rs["bin.target"]));
if (bt != ct)
- fail (loc) << "cc and bin module target mismatch" <<
- info << "cc.target is " << ct <<
- info << "bin.target is " << bt;
+ {
+ const auto& h (cast<string> (rs["cc.hinter"]));
+
+ fail (loc) << h << " and bin module target mismatch" <<
+ info << h << " target is " << ct <<
+ info << "bin target is " << bt;
+ }
}
const string& cid (cast<string> (rs["cc.id"]));