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

Unified Diff: build/scan_sources.py

Issue 798733002: Always emit original sources from scan_sources. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 6 years 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: build/scan_sources.py
diff --git a/build/scan_sources.py b/build/scan_sources.py
index 83f3f20db83192b2c346c2a6a8a296b6a7c0eddd..2c2fe41d276a0d321e61c4df14ee64e882e72880 100755
--- a/build/scan_sources.py
+++ b/build/scan_sources.py
@@ -258,7 +258,7 @@ class WorkQueue(object):
if added_dir:
self.resolver.RemoveOneDirectory(scan_dir)
scan_name = self.PopIfAvail()
- return sorted(self.added_set)
+ return self.added_set
def DoMain(argv):
@@ -288,7 +288,14 @@ def DoMain(argv):
for filename in files:
workQ.PushIfNew(filename)
- sorted_list = workQ.Run()
+ sources_set = workQ.Run()
+
+ # If any of the original files requested aren't found, add them anyway.
+ # This is so that source files that will be generated are still returned in
+ # the program output.
+ sources_set = sources_set.union(set(files))
+
+ sorted_list = sorted(sources_set)
return '\n'.join(sorted_list) + '\n'
« 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