summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2019-01-30 16:35:10 +0000
committerGabriel Russell <gabriel.russell@mongodb.com>2019-01-30 19:06:17 +0000
commitd80755651cbd268c7db03ebba914051428fedeb4 (patch)
treeedeef955820a96d615876729dfa6e03ff021ea16 /SConstruct
parent6dc4072453b4ba17fed636f049c10cf1316357bb (diff)
downloadmongo-d80755651cbd268c7db03ebba914051428fedeb4.tar.gz
SERVER-29286 import and use mozjs-60
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 11 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index e5f794b4b94..9bc1129ad5f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1652,6 +1652,11 @@ elif env.TargetOSIs('windows'):
env.Append( CCFLAGS=["/wd4355", "/wd4800", "/wd4267", "/wd4244",
"/wd4290", "/wd4068", "/wd4351", "/wd4373"] )
+ # mozjs-60 requires the following
+ # 'declaration' : no matching operator delete found; memory will not be freed if
+ # initialization throws an exception
+ env.Append( CCFLAGS=["/wd4291"] )
+
# some warnings we should treat as errors:
# c4013
# 'function' undefined; assuming extern returning int
@@ -1679,7 +1684,7 @@ elif env.TargetOSIs('windows'):
#env.Append( CCFLAGS=['/Yu"pch.h"'] )
# Don't send error reports in case of internal compiler error
- env.Append( CCFLAGS= ["/errorReport:none"] )
+ env.Append( CCFLAGS= ["/errorReport:none"] )
# Select debugging format. /Zi gives faster links but seem to use more memory
if get_option('msvc-debugging-format') == "codeview":
@@ -1854,7 +1859,7 @@ if env.TargetOSIs('posix'):
if optBuild and not optBuildForSize:
env.Append( CCFLAGS=["-O2"] )
- elif optBuild and optBuildForSize:
+ elif optBuild and optBuildForSize:
env.Append( CCFLAGS=["-Os"] )
else:
env.Append( CCFLAGS=["-O0"] )
@@ -3408,7 +3413,7 @@ def doConfigure(myenv):
if conf.CheckExtendedAlignment(size):
conf.env.SetConfigHeaderDefine("MONGO_CONFIG_MAX_EXTENDED_ALIGNMENT", size)
break
-
+
def CheckMongoCMinVersion(context):
compile_test_body = textwrap.dedent("""
#include <mongoc/mongoc.h>
@@ -3424,7 +3429,7 @@ def doConfigure(myenv):
return result
conf.AddTest('CheckMongoCMinVersion', CheckMongoCMinVersion)
-
+
if env.TargetOSIs('darwin'):
def CheckMongoCFramework(context):
context.Message("Checking for mongoc_get_major_version() in darwin framework mongoc...")
@@ -3444,7 +3449,7 @@ def doConfigure(myenv):
context.Result(result)
context.env['FRAMEWORKS'] = lastFRAMEWORKS
return result
-
+
conf.AddTest('CheckMongoCFramework', CheckMongoCFramework)
mongoc_mode = get_option('use-system-mongo-c')
@@ -3456,7 +3461,7 @@ def doConfigure(myenv):
"C",
"mongoc_get_major_version();",
autoadd=False ):
- conf.env['MONGO_HAVE_LIBMONGOC'] = "library"
+ conf.env['MONGO_HAVE_LIBMONGOC'] = "library"
if not conf.env['MONGO_HAVE_LIBMONGOC'] and env.TargetOSIs('darwin') and conf.CheckMongoCFramework():
conf.env['MONGO_HAVE_LIBMONGOC'] = "framework"
if not conf.env['MONGO_HAVE_LIBMONGOC'] and mongoc_mode == 'on':