diff options
-rw-r--r-- | src/third_party/SConscript | 12 | ||||
-rw-r--r-- | src/third_party/mozjs-60/SConscript | 24 |
2 files changed, 17 insertions, 19 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript index c86ebb12350..87b0774c3d6 100644 --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -47,20 +47,12 @@ def injectMozJS(thisEnv): if thisEnv.TargetOSIs('windows'): thisEnv.Append( - CCFLAGS=[ - '/FI', 'js-config.h', - '/FI', 'js/RequiredDefines.h', - ], CPPDEFINES=[ '_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING', ] ) else: thisEnv.Append( - CCFLAGS=[ - '-include', 'js-config.h', - '-include', 'js/RequiredDefines.h', - ], CXXFLAGS=[ '-Wno-non-virtual-dtor', '-Wno-invalid-offsetof', @@ -137,6 +129,10 @@ if True: '#/src/third_party/mozjs' + mozjsSuffix + '/mongo_sources', '#/src/third_party/mozjs' + mozjsSuffix + '/platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include", ], + 'FORCEINCLUDES' : [ + 'js-config.h', + 'js/RequiredDefines.h', + ], } if "tom" in env["MONGO_CRYPTO"]: diff --git a/src/third_party/mozjs-60/SConscript b/src/third_party/mozjs-60/SConscript index e6355ee1aad..d6a711854ee 100644 --- a/src/third_party/mozjs-60/SConscript +++ b/src/third_party/mozjs-60/SConscript @@ -35,13 +35,18 @@ if get_option('spider-monkey-dbg') == "on": 'JS_GC_ZEAL', ]) -# js-confdefs.h has to get in front on windows or wherever -if env.TargetOSIs('windows'): - env.Prepend(CCFLAGS=[ - '/FI', 'js-confdefs.h', - # 'declaration' : no matching operator delete found; memory will not be freed if - # initialization throws an exception +env.Append( + FORCEINCLUDES=[ + 'js-confdefs.h' + ], +) + +if env.TargetOSIs('windows'): + env.Append( + CCFLAGS=[ + # 'declaration' : no matching operator delete found; memory will not be freed if + # initialization throws an exception '/wd4291', # name" : the inline specifier cannot be used when a friend declaration refers to a @@ -63,13 +68,10 @@ if env.TargetOSIs('windows'): # 'operator': unsafe use of type 'type' in operation '/wd4804', - ]) + ] + ) else: - env.Append( - CCFLAGS=[ - '-include', 'js-confdefs.h', - ], CXXFLAGS=[ '-Wno-non-virtual-dtor', '-Wno-invalid-offsetof', |