From 30bd227162ffcd5cfc67ad504707b0ea2debbf7e Mon Sep 17 00:00:00 2001 From: Anders Hasselqvist Date: Sat, 16 Jan 2016 00:05:02 +0900 Subject: [PATCH] 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 --- gyp_packager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gyp_packager.py b/gyp_packager.py index 316b02b2e6..1a56d0e97b 100755 --- a/gyp_packager.py +++ b/gyp_packager.py @@ -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: