diff options
author | Andrew Morrow <acm@mongodb.com> | 2018-10-10 15:58:17 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2018-10-12 13:27:12 -0400 |
commit | 1cf0d9706d3d205f3b83e32e7d3b9bb40f17bd60 (patch) | |
tree | 537b086d6dbb171c60a60a3cddd934698f164f34 | |
parent | 46e47fabf3b5515f9d330dd552e4bcd41dde683f (diff) | |
download | mongo-1cf0d9706d3d205f3b83e32e7d3b9bb40f17bd60.tar.gz |
SERVER-37158 Apply library compatibility flags for embedded libs
-rw-r--r-- | src/mongo/embedded/mongo_embedded/SConscript | 20 | ||||
-rw-r--r-- | src/mongo/embedded/mongoc_embedded/SConscript | 16 |
2 files changed, 34 insertions, 2 deletions
diff --git a/src/mongo/embedded/mongo_embedded/SConscript b/src/mongo/embedded/mongo_embedded/SConscript index 1e38480db9d..bc01f5e42c2 100644 --- a/src/mongo/embedded/mongo_embedded/SConscript +++ b/src/mongo/embedded/mongo_embedded/SConscript @@ -27,9 +27,27 @@ elif get_option('link-model') == 'dynamic-sdk': ) mongoEmbeddedEnv.AppendUnique( - SHLINKFLAGS=['$MONGO_EXPORT_FILE_SHLINKFLAGS'] + SHLINKFLAGS=[ + '$MONGO_EXPORT_FILE_SHLINKFLAGS', + ], ) +if mongoEmbeddedEnv.TargetOSIs('darwin'): + # The current version and compatibility are the *minor* ABI + # version metadata. If you extend (but do not break) the ABI, you + # should increment current_version but leave compatibiity_version + # at 1. If you break ABI, you should bump the entire library from + # v1 to v2, in which case you would then reset both + # current_version and compatibility_version to 1. You should never + # need to set compatibility_version to anything but 1. + mongoEmbeddedEnv.AppendUnique( + SHLINKFLAGS=[ + '-Wl,-current_version,1', + '-Wl,-compatibility_version,1', + ], + ) + + mongoEmbeddedEnv.Library( target='mongo_embedded', source=[ diff --git a/src/mongo/embedded/mongoc_embedded/SConscript b/src/mongo/embedded/mongoc_embedded/SConscript index 04b606243fb..fa25dd0a1c9 100644 --- a/src/mongo/embedded/mongoc_embedded/SConscript +++ b/src/mongo/embedded/mongoc_embedded/SConscript @@ -33,10 +33,24 @@ if get_option('link-model') == 'static': ], ) +# Please see the note in ../mongo_embedded/SConscript about how to +# interpret and adjust the current and compatibility versinos. mongocEmbeddedEnv.AppendUnique( - SHLINKFLAGS=['$MONGO_EXPORT_FILE_SHLINKFLAGS'] + SHLINKFLAGS=[ + '$MONGO_EXPORT_FILE_SHLINKFLAGS', + ], ) +if mongocEmbeddedEnv.TargetOSIs('darwin'): + # Please see the note in ../mongo_embedded/SConscript about how to + # interpret and adjust the current and compatibility versinos. + mongocEmbeddedEnv.AppendUnique( + SHLINKFLAGS=[ + '-Wl,-current_version,1', + '-Wl,-compatibility_version,1', + ], + ) + mongocEmbeddedEnv.Library( target='mongoc_embedded', source=[ |