MacOSX: Skip --no-circular-check when generating Xcode projects

When gyp is generating the ninja files a circular dependency error is reported:
packager/media/file/file.gyp -> packager/media/base/media_base.gyp -> packager/media/file/file.gyp

This isn't a problem with ninja, but presumably is a problem with Xcode.
Change gyp_packager.py to use "--no-circular-check" for all generators except xcode
This commit is contained in:
Anders Hasselqvist 2016-01-16 00:05:02 +09:00 committed by KongQun Yang
parent cb8de4c2f4
commit 30bd227162
1 changed files with 5 additions and 5 deletions

View File

@ -74,18 +74,18 @@ if __name__ == '__main__':
gyp_defines += ' {0}={1}'.format(key, _DEFAULT_DEFINES[key])
os.environ['GYP_DEFINES'] = gyp_defines.strip()
# Default to ninja, but only if no generator has explicitly been set.
if not os.environ.get('GYP_GENERATORS'):
os.environ['GYP_GENERATORS'] = 'ninja'
# There shouldn't be a circular dependency relationship between .gyp files,
# but in Chromium's .gyp files, on non-Mac platforms, circular relationships
# currently exist. The check for circular dependencies is currently
# bypassed on other platforms, but is left enabled on the Mac, where a
# violation of the rule causes Xcode to misbehave badly.
if sys.platform not in ('darwin',):
if 'xcode' not in os.environ['GYP_GENERATORS']:
args.append('--no-circular-check')
# Default to ninja, but only if no generator has explicitly been set.
if not os.environ.get('GYP_GENERATORS'):
os.environ['GYP_GENERATORS'] = 'ninja'
# TODO(kqyang): Find a better way to handle the depth. This workaround works
# only if this script is executed in 'src' directory.
if ['--depth' in arg for arg in args].count(True) == 0: