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

Unified Diff: pylib/gyp/generator/analyzer.py

Issue 496363004: Makes analyzer output names of all executable target types (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 4 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 | test/analyzer/gyptest-analyzer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/analyzer.py
===================================================================
--- pylib/gyp/generator/analyzer.py (revision 1968)
+++ pylib/gyp/generator/analyzer.py (working copy)
@@ -178,7 +178,8 @@
See _DoesTargetTypeRequireBuild for details.
added_to_compile_targets: used when determining if the target was added to the
set of targets that needs to be built.
- in_roots: true if this target is a descendant of one of the root nodes."""
+ in_roots: true if this target is a descendant of one of the root nodes.
+ is_executable: true if the type of target is executable."""
def __init__(self, name):
self.deps = set()
self.match_status = MATCH_STATUS_TBD
@@ -190,6 +191,7 @@
self.requires_build = False
self.added_to_compile_targets = False
self.in_roots = False
+ self.is_executable = False
class Config(object):
@@ -302,6 +304,7 @@
target.visited = True
target.requires_build = _DoesTargetTypeRequireBuild(
target_dicts[target_name])
+ target.is_executable = target_dicts[target_name]['type'] == 'executable'
build_file = gyp.common.ParseQualifiedTarget(target_name)[0]
if not build_file in build_file_in_files:
@@ -404,8 +407,13 @@
target.added_to_compile_targets |= back_dep_target.added_to_compile_targets
target.in_roots |= back_dep_target.in_roots
- if not target.added_to_compile_targets and target.in_roots and \
- (add_if_no_ancestor or target.requires_build):
+ # Always add 'executable' targets. Even though they may be built by other
+ # targets that depend upon them it makes detection of what is going to be
+ # built easier.
+ if target.in_roots and \
+ (target.is_executable or
+ (not target.added_to_compile_targets and
+ (add_if_no_ancestor or target.requires_build))):
result.add(target)
target.added_to_compile_targets = True
« no previous file with comments | « no previous file | test/analyzer/gyptest-analyzer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698