aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-27 08:29:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-27 08:29:52 +0200
commitc2001eb367b9b82e26689cad6f1f74f46c72b904 (patch)
treedb2ee46fc11989d85201ccebaf44f51b978fb313 /build2/cc/link.cxx
parent530e19cc8f53f066039967c41bb432111ce98626 (diff)
Pass target to prerequisite search
Diffstat (limited to 'build2/cc/link.cxx')
-rw-r--r--build2/cc/link.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx
index 6d0c605..b15f340 100644
--- a/build2/cc/link.cxx
+++ b/build2/cc/link.cxx
@@ -306,7 +306,7 @@ namespace build2
const target& m (t.member != nullptr // Might already be there.
? *t.member
- : search (tt, t.dir, t.out, t.name));
+ : search (t, tt, t.dir, t.out, t.name));
target_lock l (lock (act, m));
assert (l.target != nullptr); // Someone messing with adhoc members?
@@ -438,7 +438,7 @@ namespace build2
// The rest is the same basic logic as in search_and_match().
//
if (pt == nullptr)
- pt = &p.search ();
+ pt = &p.search (t);
if (act.operation () == clean_id && !pt->dir.sub (rs.out_path ()))
continue; // Skip.
@@ -486,7 +486,7 @@ namespace build2
// If this is the obj{} target group, then pick the appropriate
// member.
//
- pt = p.is_a<obj> () ? &search (ott, p.key ()) : &p.search ();
+ pt = p.is_a<obj> () ? &search (t, ott, p.key ()) : &p.search (t);
if (act.operation () == clean_id && !pt->dir.sub (rs.out_path ()))
continue; // Skip.
@@ -539,7 +539,7 @@ namespace build2
// obj*{} is always in the out tree.
//
const target& ot (
- search (tt, d, dir_path (), *cp.tk.name, nullptr, cp.scope));
+ search (t, tt, d, dir_path (), *cp.tk.name, nullptr, cp.scope));
// If we are cleaning, check that this target is in the same or a
// subdirectory of our project root.
@@ -557,7 +557,7 @@ namespace build2
// If we have created the obj{} target group, pick one of its
// members; the rest would be primarily concerned with it.
//
- pt = group ? &search (ott, ot.dir, ot.out, ot.name) : &ot;
+ pt = group ? &search (t, ott, ot.dir, ot.out, ot.name) : &ot;
// If this obj*{} already has prerequisites, then verify they are
// "compatible" with what we are doing here. Otherwise, synthesize
@@ -699,7 +699,7 @@ namespace build2
// Searching our own prerequisite is ok, p1 must already be
// resolved.
//
- if (&p.search () != &p1.search ())
+ if (&p.search (t) != &p1.search (*pt))
fail << "synthesized dependency for prerequisite " << p << " "
<< "would be incompatible with existing target " << *pt <<
info << "existing prerequisite " << p1 << " does not match "