From a3754afdd481e4e05ee14193e04247d9bd445e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 24 Jun 2020 18:24:22 +0200 Subject: [PATCH] [hack] gyp: disable duplicate basename check Refs: https://github.com/nodejs/node-v8/issues/161 --- tools/gyp/pylib/gyp/__init__.py | 2 +- tools/gyp/pylib/gyp/generator/make.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index dee834013f4..c030939b355 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -342,7 +342,7 @@ def gyp_main(args): # deprecated. parser.add_argument('--no-duplicate-basename-check', dest='duplicate_basename_check', action='store_false', - default=True, regenerate=False, + default=False, regenerate=False, help="don't check for duplicate basenames") parser.add_argument('--no-parallel', action='store_true', default=False, help='Disable multiprocessing') diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index 848418d3fb6..1ade25b6d7f 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -673,15 +673,15 @@ def _ValidateSourcesForOSX(spec, all_sources): basename = os.path.basename(name) # Don't include extension. basenames.setdefault(basename, []).append(source) - error = '' - for basename, files in basenames.items(): - if len(files) > 1: - error += ' %s: %s\n' % (basename, ' '.join(files)) - - if error: - print(('static library %s has several files with the same basename:\n' % spec['target_name']) - + error + 'libtool on OS X will generate' + ' warnings for them.') - raise GypError('Duplicate basenames in sources section, see list above') +# error = '' +# for basename, files in basenames.items(): +# if len(files) > 1: +# error += ' %s: %s\n' % (basename, ' '.join(files)) + +# if error: +# print(('static library %s has several files with the same basename:\n' % spec['target_name']) +# + error + 'libtool on OS X will generate' + ' warnings for them.') +# raise GypError('Duplicate basenames in sources section, see list above') # Map from qualified target to path to output.