diff options
author | Andrew Schwerin <Andy Schwerin schwerin@10gen.com> | 2012-09-07 13:16:24 -0400 |
---|---|---|
committer | Andrew Schwerin <Andy Schwerin schwerin@10gen.com> | 2012-09-07 14:18:42 -0400 |
commit | 645aa497732e829fd43092f02102ac37cc3a8b08 (patch) | |
tree | 8620ce62a78796d1bc954d55dc487cc68e2f8109 /site_scons | |
parent | 8fbfada4f4c87f837f459dfdf9b2142615d41a61 (diff) | |
download | mongo-645aa497732e829fd43092f02102ac37cc3a8b08.tar.gz |
SERVER-6960 Always link object files and static archives in the same order.
SCons (correctly) considers two link command lines different if the order of
object files or static libraries changes. As a result, the libdeps system needs
to produce consistent ordering of these files in the $_LIBDEPS expansion. This
patch achieves this by sorting the _LIBDEPS candidate expansion by the string
name of the expanded objects.
This problem is akin to that from SERVER-5254, which was solved in a similar
manner.
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/libdeps.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site_scons/libdeps.py b/site_scons/libdeps.py index 561b9620244..f478d4da1f9 100644 --- a/site_scons/libdeps.py +++ b/site_scons/libdeps.py @@ -138,13 +138,13 @@ def get_libdeps(source, target, env, for_signature): """ target = env.Flatten([target]) - return list(__get_libdeps(target[0], 'LIBDEPS')) + return sorted_by_str(__get_libdeps(target[0], 'LIBDEPS')) def get_libdeps_objs(source, target, env, for_signature): objs = set() for lib in get_libdeps(source, target, env, for_signature): objs.update(lib.sources_set) - return list(objs) + return sorted_by_str(objs) def get_libdeps_special_sun(source, target, env, for_signature): x = get_libdeps(source, target, env, for_signature ) |