aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/link.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-07-22 16:44:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-07-22 16:44:34 +0200
commit3425432752d362341b8e39cd319d7f3c56aef169 (patch)
treeac8176087581f355258b6c56f6475ee0d9e46eb5 /build2/cxx/link.cxx
parent77869a0567f4c2e029c679525b29da53433d8d9f (diff)
Incorporate target to link rule's depdb
Since there is no guarantee that the target is part of the linker's checksum.
Diffstat (limited to 'build2/cxx/link.cxx')
-rw-r--r--build2/cxx/link.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx
index 3ce99c9..e714bc1 100644
--- a/build2/cxx/link.cxx
+++ b/build2/cxx/link.cxx
@@ -1091,6 +1091,7 @@ namespace build2
scope& rs (t.root_scope ());
const string& cid (cast<string> (rs["cxx.id"]));
+ const string& tgt (cast<string> (rs["cxx.target"]));
const string& tsys (cast<string> (rs["cxx.target.system"]));
const string& tclass (cast<string> (rs["cxx.target.class"]));
@@ -1239,6 +1240,12 @@ namespace build2
l4 ([&]{trace << "linker mismatch forcing update of " << t;});
}
+ // Next check the target. While it might be incorporated into the linker
+ // checksum, it also might not (e.g., MS link.exe).
+ //
+ if (dd.expect (tgt) != nullptr)
+ l4 ([&]{trace << "target mismatch forcing update of " << t;});
+
// Start building the command line. While we don't yet know whether we
// will really need it, we need to hash it to find out. So the options
// are to either replicate the exact process twice, first for hashing
@@ -1292,7 +1299,7 @@ namespace build2
auto l (t["bin.rpath"]);
if (l && !l->empty ())
- fail << cast<string> (rs["cxx.target"]) << " does not have rpath";
+ fail << tgt << " does not support rpath";
}
else
{