diff options
author | Andy Schwerin <schwerin@10gen.com> | 2013-01-03 18:22:39 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-01-03 18:30:53 -0500 |
commit | 7cbbcbbb04fe3f4c4822a10f9fab2a5975cfc75c (patch) | |
tree | a498ee0176d8497d1a5f4a672861cdf29257e9a5 /site_scons | |
parent | 2add89edce7122e2cb72aa928dfc476c95024fe5 (diff) | |
download | mongo-7cbbcbbb04fe3f4c4822a10f9fab2a5975cfc75c.tar.gz |
SERVER-7490 Fix SYSLIBDEPS when a syslibdep is specified as a file path.
Also, don't sort syslibdeps, since order matters on some OSes.
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/libdeps.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/site_scons/libdeps.py b/site_scons/libdeps.py index 35ee5b46bde..0e51743381e 100644 --- a/site_scons/libdeps.py +++ b/site_scons/libdeps.py @@ -123,7 +123,7 @@ def __get_syslibdeps(node): for lib in __get_libdeps(node): for syslib in lib.get_env().get(syslibdeps_env_var, []): syslibdeps.append(syslib) - setattr(node.attributes, cached_var_name, sorted(syslibdeps)) + setattr(node.attributes, cached_var_name, syslibdeps) return getattr(node.attributes, cached_var_name) def update_scanner(builder): @@ -169,7 +169,17 @@ def get_syslibdeps(source, target, env, for_signature): deps = __get_syslibdeps(target[0]) lib_link_prefix = env.subst('$LIBLINKPREFIX') lib_link_suffix = env.subst('$LIBLINKSUFFIX') - result = ''.join([' %s%s%s' % (lib_link_prefix, d, lib_link_suffix) for d in deps]) + result = [] + for d in deps: + # Elements of syslibdeps are either strings (str or unicode), or they're File objects. + # If they're File objects, they can be passed straight through. If they're strings, + # they're believed to represent library short names, that should be prefixed with -l + # or the compiler-specific equivalent. I.e., 'm' becomes '-lm', but 'File("m.a") is passed + # through whole cloth. + if type(d) in (str, unicode): + result.append('%s%s%s' % (lib_link_prefix, d, lib_link_suffix)) + else: + result.append(d) return result def libdeps_emitter(target, source, env): |