diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2020-08-05 20:45:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-15 02:57:58 +0000 |
commit | 3bfeaa9d487709a2169aa57d33ebbe7055444c1f (patch) | |
tree | 5843ac9c06715603951093dd59370936437aabf8 /site_scons | |
parent | f6e8864256e82900629db044fb0b2cf4b5a81861 (diff) | |
download | mongo-3bfeaa9d487709a2169aa57d33ebbe7055444c1f.tar.gz |
SERVER-49457 Ninja tool static links should delete existing archive before linking"
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/ninja_next.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/site_scons/site_tools/ninja_next.py b/site_scons/site_tools/ninja_next.py index 157eb1911bf..aff20498b60 100644 --- a/site_scons/site_tools/ninja_next.py +++ b/site_scons/site_tools/ninja_next.py @@ -462,8 +462,16 @@ class NinjaState: "rspfile_content": "$rspc", "pool": "local_pool", }, + # Ninja does not automatically delete the archive before + # invoking ar. The ar utility will append to an existing archive, which + # can cause duplicate symbols if the symbols moved between object files. + # Native SCons will perform this operation so we need to force ninja + # to do the same. See related for more info: + # https://jira.mongodb.org/browse/SERVER-49457 "AR": { - "command": "$env$AR @$out.rsp", + "command": "{}$env$AR @$out.rsp".format( + '' if sys.platform == "win32" else "rm -f $out && " + ), "description": "Archiving $out", "rspfile": "$out.rsp", "rspfile_content": "$rspc", |