From 0f1f80e2f7cf0ca1fbc9354b5fa2fad705207677 Mon Sep 17 00:00:00 2001 From: Waley Chen Date: Mon, 11 Apr 2016 17:23:59 -0400 Subject: SERVER-23571 Make debug builds of SpiderMonkey distinct from --dbg in scons (cherry picked from commit 95d6f8c8a4e8a3645d3e9e42f070a28eaaf5c97e) --- SConstruct | 9 +++++++++ src/mongo/scripting/SConscript | 4 ++-- src/third_party/mozjs-38/SConscript | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index f68d4f65a01..6a53a8f4079 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', -- cgit v1.2.1