Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: pylib/gyp/input.py

Issue 12381003: Allow files with the same basename to exist within the same project. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
bradn 2013/03/06 18:47:13 Theres a bunch of version plumbing, this would see
+ if variables.get('GENERATOR') != 'msvs' or \
+ int(variables.get('MSVS_VERSION')) > '2008':
+ 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698