From 3425432752d362341b8e39cd319d7f3c56aef169 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Jul 2016 16:44:34 +0200 Subject: Incorporate target to link rule's depdb Since there is no guarantee that the target is part of the linker's checksum. --- build2/cxx/link.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build2/cxx/link.cxx') 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 (rs["cxx.id"])); + const string& tgt (cast (rs["cxx.target"])); const string& tsys (cast (rs["cxx.target.system"])); const string& tclass (cast (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 (rs["cxx.target"]) << " does not have rpath"; + fail << tgt << " does not support rpath"; } else { -- cgit v1.1