summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2014-04-23 17:31:32 -0400
committerBenety Goh <benety@mongodb.com>2014-05-01 09:35:46 -0400
commit7e3f93197f73e5a2e0d1cff55c928dde102aa970 (patch)
tree552a760ee26a478f508236cbfc65ced7a4656389 /SConstruct
parentb7e3345e989b819b9b82707c49bcfa7188aae767 (diff)
downloadmongo-7e3f93197f73e5a2e0d1cff55c928dde102aa970.tar.gz
SERVER-13686 V8 3.25 scripting engine. Disabled by default. Enable using SCons flag js-engine=v8-3.25
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 10 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 49bc434ff2b..001bf9ee62c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -230,7 +230,9 @@ add_option( "asio" , "Use Asynchronous IO (NOT READY YET)" , 0 , True )
add_option( "ssl" , "Enable SSL" , 0 , True )
# library choices
-add_option( "usev8" , "use v8 for javascript" , 0 , True )
+js_engine_choices = ['v8-3.12', 'v8-3.25', 'none']
+add_option( "js-engine", "JavaScript scripting engine implementation", 1, True,
+ type='choice', default=js_engine_choices[0], choices=js_engine_choices)
add_option( "libc++", "use libc++ (experimental, requires clang)", 0, True )
# mongo feature options
@@ -392,7 +394,12 @@ static = has_option( "static" )
noshell = has_option( "noshell" )
-usev8 = has_option( "usev8" )
+jsEngine = get_option( "js-engine")
+
+usev8 = (jsEngine != 'none')
+
+v8version = jsEngine[3:] if jsEngine.startswith('v8-') else 'none'
+v8suffix = '' if v8version == '3.12' else '-' + v8version
asio = has_option( "asio" )
@@ -548,8 +555,6 @@ if has_option( "durableDefaultOn" ):
if has_option( "durableDefaultOff" ):
env.Append( CPPDEFINES=[ "_DURABLEDEFAULTOFF" ] )
-usev8 = True
-
extraLibPlaces = []
env['EXTRACPPPATH'] = []
@@ -1751,6 +1756,7 @@ Export("get_option")
Export("has_option use_system_version_of_library")
Export("mongoCodeVersion")
Export("usev8")
+Export("v8version v8suffix")
Export("darwin windows solaris linux freebsd nix openbsd")
Export('module_sconscripts')
Export("debugBuild optBuild")