diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2021-03-19 21:42:59 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-29 19:24:45 +0000 |
commit | 7c3a9eff515d5137e3f4f40bdad4744fe62b4e54 (patch) | |
tree | f5b1e906b81cd7c55ed03efd0cce1580a9a2d2d0 /site_scons | |
parent | e3b662322d3894ec252703096f6d4034329ebd33 (diff) | |
download | mongo-7c3a9eff515d5137e3f4f40bdad4744fe62b4e54.tar.gz |
SERVER-54928 switch no-init-global flags to be stored on node instead of env.
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/libdeps.py | 6 | ||||
-rw-r--r-- | site_scons/libdeps_next.py | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/site_scons/libdeps.py b/site_scons/libdeps.py index 4e2d1723a9c..8dd859222e3 100644 --- a/site_scons/libdeps.py +++ b/site_scons/libdeps.py @@ -109,8 +109,8 @@ class FlaggedLibdep: # We need to maintain our own copy so as not to disrupt the env's original list. try: - self.prefix_flags = copy.copy(libnode.get_env().get('LIBDEPS_PREFIX_FLAGS', [])) - self.postfix_flags = copy.copy(libnode.get_env().get('LIBDEPS_POSTFIX_FLAGS', [])) + self.prefix_flags = copy.copy(getattr(libnode.attributes, 'libdeps_prefix_flags', [])) + self.postfix_flags = copy.copy(getattr(libnode.attributes, 'libdeps_postfix_flags', [])) except AttributeError: self.prefix_flags = [] self.postfix_flags = [] @@ -858,7 +858,7 @@ def expand_libdeps_with_flags(source, target, env, for_signature): # -Wl--on-flag libA.a -Wl--off-flag -Wl--on-flag libA.a -Wl--off-flag # This loop below will spot the cases were the flag was turned off and then # immediately turned back on - for switch_flag in env.get('LIBDEPS_SWITCH_FLAGS', []): + for switch_flag in getattr(flagged_libdep.libnode.attributes, 'libdeps_switch_flags', []): if (prev_libdep and switch_flag['on'] in flagged_libdep.prefix_flags and switch_flag['off'] in prev_libdep.postfix_flags): diff --git a/site_scons/libdeps_next.py b/site_scons/libdeps_next.py index bff6a09e127..455131e6f38 100644 --- a/site_scons/libdeps_next.py +++ b/site_scons/libdeps_next.py @@ -137,8 +137,8 @@ class FlaggedLibdep: # We need to maintain our own copy so as not to disrupt the env's original list. try: - self.prefix_flags = copy.copy(libnode.get_env().get('LIBDEPS_PREFIX_FLAGS', [])) - self.postfix_flags = copy.copy(libnode.get_env().get('LIBDEPS_POSTFIX_FLAGS', [])) + self.prefix_flags = copy.copy(getattr(libnode.attributes, 'libdeps_prefix_flags', [])) + self.postfix_flags = copy.copy(getattr(libnode.attributes, 'libdeps_postfix_flags', [])) except AttributeError: self.prefix_flags = [] self.postfix_flags = [] @@ -1158,7 +1158,7 @@ def expand_libdeps_with_flags(source, target, env, for_signature): # -Wl--on-flag libA.a -Wl--off-flag -Wl--on-flag libA.a -Wl--off-flag # This loop below will spot the cases were the flag was turned off and then # immediately turned back on - for switch_flag in env.get('LIBDEPS_SWITCH_FLAGS', []): + for switch_flag in getattr(flagged_libdep.libnode.attributes, 'libdeps_switch_flags', []): if (prev_libdep and switch_flag['on'] in flagged_libdep.prefix_flags and switch_flag['off'] in prev_libdep.postfix_flags): @@ -1497,7 +1497,6 @@ def setup_environment(env, emitting_shared=False, debug='off', linting='on', san ) env.Prepend(_LIBFLAGS="$_LIBDEPS_TAGS $_LIBDEPS $_SYSLIBDEPS ") - env.Prepend(ARFLAGS="$_LIBDEPS_TAGS") for builder_name in ("Program", "SharedLibrary", "LoadableModule", "SharedArchive"): try: update_scanner(env, builder_name, debug=debug) |