summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_deps.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index ef0bc793ae..674dc07254 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -603,7 +603,9 @@ def calculate_final_deps(bld, tgt_list, loops):
dependency_loop(loops, t, t2.sname)
t2.final_libs.remove(t.sname)
- for type in ['BINARY', 'PYTHON']:
+ rely_on = {}
+
+ for type in ['BINARY', 'PYTHON', 'LIBRARY']:
for t in tgt_list:
if t.samba_type != type: continue
# if we will indirectly link to a target then we don't need it
@@ -617,15 +619,23 @@ def calculate_final_deps(bld, tgt_list, loops):
t.sname, t.samba_type, dup, t2.samba_type, l)
new = new.difference(dup)
changed = True
+ if not l in rely_on:
+ rely_on[l] = set()
+ rely_on[l] = rely_on[l].union(dup)
t.final_objects = new
+ # add back in any objects that were relied upon by the reduction rules
+ for r in rely_on:
+ t = bld.name_to_obj(r, bld.env)
+ t.final_objects = t.final_objects.union(rely_on[r])
+
for loop in loops:
debug('deps: Found dependency loops for target %s : %s', loop, loops[loop])
# we now need to make corrections for any library loops we broke up
# any target that depended on the target of the loop and doesn't
# depend on the source of the loop needs to get the loop source added
- for type in ['BINARY','PYTHON','LIBRARY']:
+ for type in ['BINARY','PYTHON','LIBRARY','BINARY']:
for t in tgt_list:
if t.samba_type != type: continue
for loop in loops: