summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaley Chen <waleycz@gmail.com>2016-04-11 17:23:59 -0400
committerWaley Chen <waleycz@gmail.com>2016-04-11 17:23:59 -0400
commit95d6f8c8a4e8a3645d3e9e42f070a28eaaf5c97e (patch)
tree329fc417f34951af49ff773700786698264286d4
parenta2192342c342638c3ba173ea4cbb05ffbf1d322c (diff)
downloadmongo-95d6f8c8a4e8a3645d3e9e42f070a28eaaf5c97e.tar.gz
SERVER-23571 Make debug builds of SpiderMonkey distinct from --dbg in scons
-rw-r--r--SConstruct9
-rw-r--r--src/mongo/scripting/SConscript4
-rw-r--r--src/third_party/mozjs-38/SConscript4
3 files changed, 13 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 4131b7643c5..c494ad5fe1c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -244,6 +244,15 @@ add_option('dbg',
type='choice',
)
+add_option('spider-monkey-dbg',
+ choices=['on', 'off'],
+ const='on',
+ default='off',
+ help='Enable SpiderMonkey debug mode',
+ nargs='?',
+ type='choice',
+)
+
add_option('opt',
choices=['on', 'off'],
const='on',
diff --git a/src/mongo/scripting/SConscript b/src/mongo/scripting/SConscript
index c27e780985a..3f1e034fa40 100644
--- a/src/mongo/scripting/SConscript
+++ b/src/mongo/scripting/SConscript
@@ -1,8 +1,8 @@
# -*- mode: python -*-
Import([
- 'debugBuild',
'env',
+ 'get_option',
'serverJs',
'usemozjs',
])
@@ -86,7 +86,7 @@ if usemozjs:
'STATIC_JS_API=1',
])
- if debugBuild:
+ if get_option('spider-monkey-dbg') == "on":
scriptingEnv.Prepend(CPPDEFINES=[
'DEBUG',
'JS_DEBUG',
diff --git a/src/third_party/mozjs-38/SConscript b/src/third_party/mozjs-38/SConscript
index bcb8e684f8b..6d073ea5b2c 100644
--- a/src/third_party/mozjs-38/SConscript
+++ b/src/third_party/mozjs-38/SConscript
@@ -1,8 +1,8 @@
# -*- mode: python -*-
Import([
- "debugBuild",
"env",
+ "get_option",
])
env = env.Clone()
@@ -28,7 +28,7 @@ env.Prepend(CPPDEFINES=[
'U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1',
])
-if debugBuild:
+if get_option('spider-monkey-dbg') == "on":
env.Prepend(CPPDEFINES=[
'DEBUG',
'JS_DEBUG',