diff options
-rw-r--r-- | SConstruct | 9 | ||||
-rw-r--r-- | src/mongo/scripting/SConscript | 4 | ||||
-rw-r--r-- | src/third_party/mozjs-38/SConscript | 4 |
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', |