summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-30 23:08:01 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:20 +1000
commit30fa7da5242823b0da7dedbbf8cf2221a99ec49c (patch)
tree57ed2e068a46f41b8b8d98dadb38815695018a52
parent3154733c33ce51c61a023fe27148c3ab154786fb (diff)
downloadsamba-30fa7da5242823b0da7dedbbf8cf2221a99ec49c.tar.gz
samba-30fa7da5242823b0da7dedbbf8cf2221a99ec49c.tar.bz2
samba-30fa7da5242823b0da7dedbbf8cf2221a99ec49c.zip
build: finally got LIBRARY<->LIBRARY reductions working
the install size is now 100M
-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: