summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@10gen.com>2019-10-24 19:50:41 +0000
committerevergreen <evergreen@mongodb.com>2019-10-24 19:50:41 +0000
commit25e8528e420bd128cd0f944aba37afce3907276e (patch)
treec1990e8d675cd1a611dd2ab658174e01f7a43f76
parentdc859def4ed7752661bdac92caf0afa63323edfd (diff)
downloadmongo-25e8528e420bd128cd0f944aba37afce3907276e.tar.gz
SERVER-42042 Fail the build if it is set up to wander into the trilemmar3.6.8-rc1r3.6.8
-rw-r--r--SConstruct9
1 files changed, 9 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index b6db8d20b46..9abda8b6597 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1355,6 +1355,15 @@ if link_model == "auto":
if env.TargetOSIs('windows') and link_model not in ['object', 'static', 'dynamic-sdk']:
env.FatalError("Windows builds must use the 'object', 'dynamic-sdk', or 'static' link models")
+
+# The mongodbtoolchain currently doesn't produce working binaries if
+# you combine a dynamic build with a non-system allocator, but the
+# failure mode is non-obvious. For now, prevent people from wandering
+# inadvertantly into this trap. Remove this constraint when
+# https://jira.mongodb.org/browse/SERVER-27675 is resolved.
+if (link_model == 'dynamic') and ('mongodbtoolchain' in env['CXX']) and (env['MONGO_ALLOCATOR'] != 'system'):
+ env.FatalError('Cannot combine the MongoDB toolchain, a dynamic build, and a non-system allocator. Choose two.')
+
# The 'object' mode for libdeps is enabled by setting _LIBDEPS to $_LIBDEPS_OBJS. The other two
# modes operate in library mode, enabled by setting _LIBDEPS to $_LIBDEPS_LIBS.
env['_LIBDEPS'] = '$_LIBDEPS_OBJS' if link_model == "object" else '$_LIBDEPS_LIBS'