mirror of
https://github.com/samba-team/samba.git
synced 2025-05-28 21:05:48 +03:00
build: finally got LIBRARY<->LIBRARY reductions working
the install size is now 100M
This commit is contained in:
parent
3154733c33
commit
30fa7da524
@ -603,7 +603,9 @@ def calculate_final_deps(bld, tgt_list, loops):
|
|||||||
dependency_loop(loops, t, t2.sname)
|
dependency_loop(loops, t, t2.sname)
|
||||||
t2.final_libs.remove(t.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:
|
for t in tgt_list:
|
||||||
if t.samba_type != type: continue
|
if t.samba_type != type: continue
|
||||||
# if we will indirectly link to a target then we don't need it
|
# 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)
|
t.sname, t.samba_type, dup, t2.samba_type, l)
|
||||||
new = new.difference(dup)
|
new = new.difference(dup)
|
||||||
changed = True
|
changed = True
|
||||||
|
if not l in rely_on:
|
||||||
|
rely_on[l] = set()
|
||||||
|
rely_on[l] = rely_on[l].union(dup)
|
||||||
t.final_objects = new
|
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:
|
for loop in loops:
|
||||||
debug('deps: Found dependency loops for target %s : %s', loop, loops[loop])
|
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
|
# 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
|
# 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
|
# 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:
|
for t in tgt_list:
|
||||||
if t.samba_type != type: continue
|
if t.samba_type != type: continue
|
||||||
for loop in loops:
|
for loop in loops:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user