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.
--- 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.