summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorsergey.galtsev <sergey.galtsev@mongodb.com>2022-01-14 20:55:59 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-14 22:12:27 +0000
commit2fb4480e741f46d89b1245295414ed36501c57ae (patch)
tree01b211935fe8ac5fa610458fc8ad13d5ebfe38bf /SConstruct
parent2c2b30be40afa01b09440ec72626c26a3cb4b9ed (diff)
downloadmongo-2fb4480e741f46d89b1245295414ed36501c57ae.tar.gz
SERVER-62156 implement SHLINKFLAGS_EXTRA and use it in csfle builds
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct8
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index c5113604c86..03b6d302f82 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1031,6 +1031,10 @@ env_vars.Add('SHLINKFLAGS',
help='Sets flags for the linker when building shared libraries',
converter=variable_shlex_converter)
+env_vars.Add('SHLINKFLAGS_EXTRA',
+ help='Adds additional flags for shared links without overwriting tool configured SHLINKFLAGS values',
+ converter=variable_shlex_converter)
+
env_vars.Add('STRIP',
help='Path to the strip utility (non-darwin platforms probably use OBJCOPY for this)',
)
@@ -1805,6 +1809,10 @@ if not env.TargetOSIs('windows'):
env["LINKCOM"] = env["LINKCOM"].replace("$LINKFLAGS", "$PROGLINKFLAGS")
env["PROGLINKFLAGS"] = ['$LINKFLAGS']
+# When it is necessary to supply additional SHLINKFLAGS without modifying the toolset default,
+# following appends contents of SHLINKFLAGS_EXTRA variable to the linker command
+env.AppendUnique(SHLINKFLAGS=['$SHLINKFLAGS_EXTRA'])
+
if not env.Verbose():
env.Append( CCCOMSTR = "Compiling $TARGET" )
env.Append( CXXCOMSTR = env["CCCOMSTR"] )