Chromium Code Reviews| Index: pylib/gyp/input.py |
| =================================================================== |
| --- pylib/gyp/input.py (revision 1589) |
| +++ pylib/gyp/input.py (working copy) |
| @@ -2326,10 +2326,18 @@ |
| target_type)) |
| -def ValidateSourcesInTarget(target, target_dict, build_file): |
| +def ValidateSourcesInTarget(target, target_dict, build_file, variables): |
| + |
| + # For MSVS versions <= 2008, files with duplicate basenames are not allowed. |
| + # For all other build configs, duplicates are OK. |
| + if variables.get('GENERATOR', '') != 'msvs' or \ |
|
Sam Clegg
2013/02/28 17:35:26
nit: No need to pass second arg to get()
|
| + int(variables.get('MSVS_VERSION', '9999')) > '2008': |
|
Sam Clegg
2013/02/28 17:35:26
Is it possible that MSVS_VERSION is not set when g
|
| + return |
| + |
| # TODO: Check if MSVC allows this for loadable_module targets. |
| if target_dict.get('type', None) not in ('static_library', 'shared_library'): |
| return |
| + |
| sources = target_dict.get('sources', []) |
| basenames = {} |
| for source in sources: |
| @@ -2662,10 +2670,7 @@ |
| target_dict = targets[target] |
| build_file = gyp.common.BuildFile(target) |
| ValidateTargetType(target, target_dict) |
| - # TODO(thakis): Get vpx_scale/arm/scalesystemdependent.c to be renamed to |
| - # scalesystemdependent_arm_additions.c or similar. |
| - if 'arm' not in variables.get('target_arch', ''): |
| - ValidateSourcesInTarget(target, target_dict, build_file) |
| + ValidateSourcesInTarget(target, target_dict, build_file, variables) |
| ValidateRulesInTarget(target, target_dict, extra_sources_for_rules) |
| ValidateRunAsInTarget(target, target_dict, build_file) |
| ValidateActionsInTarget(target, target_dict, build_file) |