Bug 1466054 - Enable STL wrapping in gn and gyp processed code. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 01 Jun 2018 17:20:51 +0900
changeset 803163 718104571b41b1fb424156800be56aded85fa6e6
parent 803162 e829b5e2f0cfec472b6d0c477680599ef1eae1c7
child 803164 a65c09c8fbfbe48ae171a86ee23ce99bb69d1436
push id112030
push userbmo:mh+mozilla@glandium.org
push dateFri, 01 Jun 2018 22:09:45 +0000
reviewersbuild
bugs1466054
milestone62.0a1
Bug 1466054 - Enable STL wrapping in gn and gyp processed code. r?build We wrap STL headers so as to ensure our inline infallible operator new definitions are used, but for some reason, STL wrappers were disabled in whatever code we used gyp for first, and that ended up spreading as more things used gyp, and now with gn, whose handling cargo culted STL disabling from the gyp code. We remove all this disabling, because it turns out it causes no build problem anymore.
python/mozbuild/mozbuild/frontend/gyp_reader.py
python/mozbuild/mozbuild/gn_processor.py
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py
+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py
@@ -321,17 +321,16 @@ def process_gyp_result(gyp_result, gyp_d
               '!/ipc/ipdl/_ipdlheaders',
               '/ipc/chromium/src',
               '/ipc/glue',
           ]
           # These get set via VC project file settings for normal GYP builds.
           if config.substs['OS_TARGET'] == 'WINNT':
               context['DEFINES']['UNICODE'] = True
               context['DEFINES']['_UNICODE'] = True
-        context['COMPILE_FLAGS']['STL'] = []
         context['COMPILE_FLAGS']['OS_INCLUDES'] = []
 
         for key, value in gyp_dir_attrs.sandbox_vars.items():
             if context.get(key) and isinstance(context[key], list):
                 # If we have a key from sanbox_vars that's also been
                 # populated here we use the value from sandbox_vars as our
                 # basis rather than overriding outright.
                 context[key] = value + context[key]
--- a/python/mozbuild/mozbuild/gn_processor.py
+++ b/python/mozbuild/mozbuild/gn_processor.py
@@ -318,17 +318,16 @@ def process_gn_config(gn_config, srcdir,
         ]
         # These get set via VC project file settings for normal GYP builds.
         # TODO: Determine if these defines are needed for GN builds.
         if gn_config['mozbuild_args']['OS_TARGET'] == 'WINNT':
             context_attrs['DEFINES']['UNICODE'] = True
             context_attrs['DEFINES']['_UNICODE'] = True
 
         context_attrs['COMPILE_FLAGS'] = {
-            'STL': [],
             'OS_INCLUDES': [],
         }
 
         for key, value in sandbox_vars.items():
             if context_attrs.get(key) and isinstance(context_attrs[key], list):
                 # If we have a key from sandbox_vars that's also been
                 # populated here we use the value from sandbox_vars as our
                 # basis rather than overriding outright.