mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-7086 Integrate third_party V8 build into SConstruct
This commit is contained in:
parent
fe30403835
commit
6e9661724b
@ -209,6 +209,7 @@ add_option( "use-system-boost", "use system version of boost libraries", 0, True
|
||||
add_option( "use-system-snappy", "use system version of snappy library", 0, True )
|
||||
|
||||
add_option( "use-system-sm", "use system version of spidermonkey library", 0, True )
|
||||
add_option( "use-system-v8", "use system version of v8 library", 0, True )
|
||||
|
||||
add_option( "use-system-all" , "use all system libraries", 0 , True )
|
||||
|
||||
@ -734,10 +735,6 @@ if nix:
|
||||
print( "removing precompiled headers" )
|
||||
os.unlink( env.File("$BUILD_DIR/mongo/pch.h.$GCHSUFFIX").abspath ) # gcc uses the file if it exists
|
||||
|
||||
if usev8:
|
||||
env.Prepend( EXTRACPPPATH=["#/../v8/include/"] )
|
||||
env.Prepend( EXTRALIBPATH=["#/../v8/"] )
|
||||
|
||||
if usesm:
|
||||
env.Append( CPPDEFINES=["JS_C_STRINGS_ARE_UTF8"] )
|
||||
|
||||
@ -814,7 +811,7 @@ def doConfigure(myenv):
|
||||
if solaris:
|
||||
conf.CheckLib( "nsl" )
|
||||
|
||||
if usev8:
|
||||
if usev8 and use_system_version_of_library("v8"):
|
||||
if debugBuild:
|
||||
v8_lib_choices = ["v8_g", "v8"]
|
||||
else:
|
||||
|
@ -219,7 +219,7 @@ elif usev8:
|
||||
'scripting/v8_db.cpp',
|
||||
'scripting/v8_utils.cpp',
|
||||
'scripting/v8_wrapper.cpp'],
|
||||
LIBDEPS=['bson_template_evaluator'])
|
||||
LIBDEPS=['bson_template_evaluator', '$BUILD_DIR/third_party/shim_v8'])
|
||||
else:
|
||||
env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_none.cpp'],
|
||||
LIBDEPS=['bson_template_evaluator'])
|
||||
|
28
src/third_party/SConscript
vendored
28
src/third_party/SConscript
vendored
@ -1,6 +1,6 @@
|
||||
# -*- mode: python -*-
|
||||
|
||||
Import("env use_system_version_of_library windows darwin")
|
||||
Import("env use_system_version_of_library windows darwin usesm usev8")
|
||||
|
||||
env.SConscript( [
|
||||
"murmurhash3/SConscript",
|
||||
@ -35,16 +35,24 @@ else:
|
||||
env.SConscript('snappy/SConscript')
|
||||
env.StaticLibrary('shim_snappy', ['shim_snappy.cpp'], LIBDEPS=['snappy/snappy'])
|
||||
|
||||
if use_system_version_of_library("sm"):
|
||||
env.StaticLibrary("shim_spidermonkey", ['shim_spidermonkey.cpp'], SYSLIBDEPS=['js'])
|
||||
else:
|
||||
if windows:
|
||||
env.Append(CPPDEFINES=['XP_WIN'])
|
||||
if usesm:
|
||||
if use_system_version_of_library("sm"):
|
||||
env.StaticLibrary("shim_spidermonkey", ['shim_spidermonkey.cpp'], SYSLIBDEPS=['js'])
|
||||
else:
|
||||
env.Append(CPPDEFINES=['XP_UNIX'])
|
||||
env.Append(CPPPATH='$BUILD_DIR/third_party/js-1.7')
|
||||
env.SConscript('js-1.7/SConscript')
|
||||
env.StaticLibrary('shim_spidermonkey', ['shim_spidermonkey.cpp'], LIBDEPS=['js-1.7/js'])
|
||||
if windows:
|
||||
env.Append(CPPDEFINES=['XP_WIN'])
|
||||
else:
|
||||
env.Append(CPPDEFINES=['XP_UNIX'])
|
||||
env.Append(CPPPATH='$BUILD_DIR/third_party/js-1.7')
|
||||
env.SConscript('js-1.7/SConscript')
|
||||
env.StaticLibrary('shim_spidermonkey', ['shim_spidermonkey.cpp'], LIBDEPS=['js-1.7/js'])
|
||||
elif usev8:
|
||||
if use_system_version_of_library("v8"):
|
||||
env.StaticLibrary("shim_v8", ['shim_v8.cpp'], SYSLIBDEPS=['v8'])
|
||||
else:
|
||||
env.Append(CPPPATH='$BUILD_DIR/third_party/v8/include')
|
||||
env.SConscript('v8/SConscript')
|
||||
env.StaticLibrary('shim_v8', ['shim_v8.cpp'], LIBDEPS=['v8/v8'])
|
||||
|
||||
if (GetOption("allocator") != "tcmalloc") or use_system_version_of_library("tcmalloc"):
|
||||
env.StaticLibrary("shim_allocator", "shim_allocator.cpp")
|
||||
|
3
src/third_party/shim_v8.cpp
vendored
Normal file
3
src/third_party/shim_v8.cpp
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// This file intentionally blank. shim_v8.cpp is part of the
|
||||
// third_party/v8 library, which is just a placeholder for forwarding
|
||||
// library dependencies.
|
Loading…
Reference in New Issue
Block a user