diff options
author | Refael Ackermann <refack@gmail.com> | 2017-03-14 18:12:22 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-04-18 13:22:28 -0400 |
commit | 3a334b12807eae369d487e0dce594681661fdcc5 (patch) | |
tree | 5008bb0acd6dde1bb544acd5fd4c608641d9daa4 /tools/gyp/pylib/gyp/xcode_ninja.py | |
parent | 1e7f6b157133d89b841de9bbc3348c474717b83d (diff) | |
download | android-node-v8-3a334b12807eae369d487e0dce594681661fdcc5.tar.gz android-node-v8-3a334b12807eae369d487e0dce594681661fdcc5.tar.bz2 android-node-v8-3a334b12807eae369d487e0dce594681661fdcc5.zip |
tools: update gyp to eb296f6
* [win] Add support for MS VS2017 (via Registry)
REF: https://chromium.googlesource.com/external/gyp/+/eb296f67da078ec01f5e3a9ea9cdc6d26d680161
PR-URL: https://github.com/nodejs/node/pull/12450
Reviewed-By: João Reis <reis@janeasystems.com>
Diffstat (limited to 'tools/gyp/pylib/gyp/xcode_ninja.py')
-rw-r--r-- | tools/gyp/pylib/gyp/xcode_ninja.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tools/gyp/pylib/gyp/xcode_ninja.py b/tools/gyp/pylib/gyp/xcode_ninja.py index 3820d6bf04..bc76ffff4e 100644 --- a/tools/gyp/pylib/gyp/xcode_ninja.py +++ b/tools/gyp/pylib/gyp/xcode_ninja.py @@ -92,11 +92,16 @@ def _TargetFromSpec(old_spec, params): new_xcode_settings['CODE_SIGNING_REQUIRED'] = "NO" new_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] = \ old_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] + for key in ['BUNDLE_LOADER', 'TEST_HOST']: + if key in old_xcode_settings: + new_xcode_settings[key] = old_xcode_settings[key] + ninja_target['configurations'][config] = {} ninja_target['configurations'][config]['xcode_settings'] = \ new_xcode_settings ninja_target['mac_bundle'] = old_spec.get('mac_bundle', 0) + ninja_target['mac_xctest_bundle'] = old_spec.get('mac_xctest_bundle', 0) ninja_target['ios_app_extension'] = old_spec.get('ios_app_extension', 0) ninja_target['ios_watchkit_extension'] = \ old_spec.get('ios_watchkit_extension', 0) @@ -138,9 +143,10 @@ def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): if target_extras is not None and re.search(target_extras, target_name): return True - # Otherwise just show executable targets. - if spec.get('type', '') == 'executable' and \ - spec.get('product_extension', '') != 'bundle': + # Otherwise just show executable targets and xc_tests. + if (int(spec.get('mac_xctest_bundle', 0)) != 0 or + (spec.get('type', '') == 'executable' and + spec.get('product_extension', '') != 'bundle')): # If there is a filter and the target does not match, exclude the target. if executable_target_pattern is not None: @@ -227,13 +233,26 @@ def CreateWrapper(target_list, target_dicts, data, params): # Tell Xcode to look everywhere for headers. sources_target['configurations'] = {'Default': { 'include_dirs': [ depth ] } } + # Put excluded files into the sources target so they can be opened in Xcode. + skip_excluded_files = \ + not generator_flags.get('xcode_ninja_list_excluded_files', True) + sources = [] for target, target_dict in target_dicts.iteritems(): base = os.path.dirname(target) files = target_dict.get('sources', []) + \ target_dict.get('mac_bundle_resources', []) + + if not skip_excluded_files: + files.extend(target_dict.get('sources_excluded', []) + + target_dict.get('mac_bundle_resources_excluded', [])) + for action in target_dict.get('actions', []): files.extend(action.get('inputs', [])) + + if not skip_excluded_files: + files.extend(action.get('inputs_excluded', [])) + # Remove files starting with $. These are mostly intermediate files for the # build system. files = [ file for file in files if not file.startswith('$')] |