Bug 1371485 - Use updated version of gyp; r=chmanchester

Tags: #secure-revision

Bug #: 1371485

Differential Revision: https://phabricator.services.mozilla.com/D1801

--HG--
extra : rebase_source : 87cd91fdc0cc873c7f78e128f545524f66947035
This commit is contained in:
Dan Minor 2018-06-21 14:39:34 -04:00
Родитель 337e0066fd
Коммит a8d7d7ecf2
8 изменённых файлов: 3864 добавлений и 10 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,96 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This gypi file defines the patterns used for determining whether a
# file is excluded from the build on a given platform. It is
# included by common.gypi for chromium_code.
{
'target_conditions': [
['OS!="win" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)win/'],
['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
}],
['OS!="mac" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
['exclude', '(^|/)(cocoa|mac)/'] ],
}],
['OS!="ios" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
['exclude', '(^|/)ios/'] ],
}],
['(OS!="mac" and OS!="ios") or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '\\.mm?$' ] ],
}],
# Do not exclude the linux files on *BSD since most of them can be
# shared at this point.
# In case a file is not needed, it is going to be excluded later on.
# TODO(evan): the above is not correct; we shouldn't build _linux
# files on non-linux.
['OS!="linux" and OS!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '_linux(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)linux/'],
],
}],
['OS!="android"', {
'sources/': [
['exclude', '_android(_unittest)?\\.cc$'],
['exclude', '(^|/)android/'],
],
}],
['OS=="win" and >(nacl_untrusted_build)==0', {
'sources/': [
['exclude', '_posix(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)posix/'],
],
}],
['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_chromeos(_unittest)?\\.(h|cc)$'] ]
}],
['>(nacl_untrusted_build)==0', {
'sources/': [
['exclude', '_nacl(_unittest)?\\.(h|cc)$'],
],
}],
['OS!="linux" and OS!="solaris" and <(os_bsd)!=1 or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
],
}],
['<(use_x11)!=1 or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '_(x|x11)(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
],
}],
['(<(toolkit_uses_gtk)!=1 or >(nacl_untrusted_build)==1) and (build_with_mozilla==0)', {
'sources/': [
['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)gtk/'],
['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
],
}],
['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
}],
['<(use_aura)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aura(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)aura/'],
]
}],
['<(use_aura)==0 or <(use_x11)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aurax11\\.(h|cc)$'] ]
}],
['<(use_aura)==0 or OS!="win" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aurawin\\.(h|cc)$'] ]
}],
['<(use_ash)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_ash(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)ash/'],
]
}],
]
}

Просмотреть файл

@ -0,0 +1,18 @@
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'msvs_settings': {
'VCCLCompilerTool': {
'StringPooling': 'true',
},
'VCLinkerTool': {
# No incremental linking.
'LinkIncremental': '1',
# Eliminate Unreferenced Data (/OPT:REF).
'OptimizeReferences': '2',
# Folding on (/OPT:ICF).
'EnableCOMDATFolding': '2',
},
},
}

Просмотреть файл

@ -0,0 +1,17 @@
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': ['release_defaults.gypi'],
'msvs_settings': {
'VCCLCompilerTool': {
'OmitFramePointers': 'false',
# The above is not sufficient (http://crbug.com/106711): it
# simply eliminates an explicit "/Oy", but both /O2 and /Ox
# perform FPO regardless, so we must explicitly disable.
# We still want the false setting above to avoid having
# "/Oy /Oy-" and warnings about overriding.
'AdditionalOptions': ['/Oy-'],
},
},
}

Просмотреть файл

@ -0,0 +1,43 @@
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': ['release_defaults.gypi'],
'defines': ['OFFICIAL_BUILD'],
'msvs_settings': {
'VCCLCompilerTool': {
'InlineFunctionExpansion': '2',
'EnableIntrinsicFunctions': 'true',
'EnableFiberSafeOptimizations': 'true',
'OmitFramePointers': 'false',
# The above is not sufficient (http://crbug.com/106711): it
# simply eliminates an explicit "/Oy", but both /O2 and /Ox
# perform FPO regardless, so we must explicitly disable.
# We still want the false setting above to avoid having
# "/Oy /Oy-" and warnings about overriding.
'AdditionalOptions': ['/Oy-'],
},
'VCLibrarianTool': {
'AdditionalOptions': [
'/ltcg',
'/expectedoutputsize:120000000'
],
},
'VCLinkerTool': {
'AdditionalOptions': [
'/time',
# This may reduce memory fragmentation during linking.
# The expected size is 40*1024*1024, which gives us about 10M of
# headroom as of Dec 16, 2011.
'/expectedoutputsize:41943040',
],
'LinkTimeCodeGeneration': '1',
# The /PROFILE flag causes the linker to add a "FIXUP" debug stream to
# the generated PDB. According to MSDN documentation, this flag is only
# available (or perhaps supported) in the Enterprise (team development)
# version of Visual Studio. If this blocks your official build, simply
# comment out this line, then re-run "gclient runhooks".
'Profile': 'true',
},
},
}

Просмотреть файл

@ -0,0 +1,17 @@
{
'conditions': [
# Handle build types.
['buildtype=="Dev"', {
'includes': ['internal/release_impl.gypi'],
}],
['buildtype=="Official"', {
'includes': ['internal/release_impl_official.gypi'],
}],
# TODO(bradnelson): may also need:
# checksenabled
# coverage
# dom_stats
# pgo_instrument
# pgo_optimize
],
}

Просмотреть файл

@ -17,6 +17,7 @@ mozilla.pth:third_party/python/fluent
mozilla.pth:third_party/python/funcsigs
mozilla.pth:third_party/python/futures
mozilla.pth:third_party/python/more-itertools
mozilla.pth:third_party/python/gyp/pylib
mozilla.pth:third_party/python/python-hglib
mozilla.pth:third_party/python/pluggy
mozilla.pth:third_party/python/jsmin
@ -66,7 +67,6 @@ mozilla.pth:testing/xpcshell
mozilla.pth:third_party/python/mock-1.0.0
mozilla.pth:xpcom/typelib/xpt/tools
mozilla.pth:tools/docs
mozilla.pth:media/webrtc/trunk/tools/gyp/pylib
mozilla.pth:third_party/python/cbor2
mozilla.pth:third_party/python/pyasn1
mozilla.pth:third_party/python/pyasn1-modules

Просмотреть файл

@ -40,7 +40,7 @@ sys.modules['gyp.generator.mozbuild'] = sys.modules[__name__]
# chrome_src for the default includes, so go backwards from the pylib
# directory, which is the parent directory of gyp module.
chrome_src = mozpath.abspath(mozpath.join(mozpath.dirname(gyp.__file__),
'../../../..'))
'../../../../..'))
script_dir = mozpath.join(chrome_src, 'build')
@ -377,13 +377,7 @@ class GypProcessor(object):
# to override the registry detection of VC++ in gyp.
os.environ['GYP_MSVS_OVERRIDE_PATH'] = 'fake_path'
# TODO bug 1371485 upgrade vendored version of GYP to something that
# doesn't barf when MSVS_VERSION==2017.
msvs_version = config.substs['MSVS_VERSION']
if msvs_version == '2017':
warnings.warn('MSVS_VERSION being set to 2015 to appease GYP')
msvs_version = '2015'
os.environ['GYP_MSVS_VERSION'] = msvs_version
os.environ['GYP_MSVS_VERSION'] = config.substs['MSVS_VERSION']
params = {
b'parallel': False,
@ -398,7 +392,8 @@ class GypProcessor(object):
else:
depth = chrome_src
# Files that gyp_chromium always includes
includes = [encode(mozpath.join(script_dir, 'common.gypi'))]
includes = [encode(mozpath.join(script_dir, 'gyp_includes',
'common.gypi'))]
finder = FileFinder(chrome_src)
includes.extend(encode(mozpath.join(chrome_src, name))
for name, _ in finder.find('*/supplement.gypi'))