summaryrefslogtreecommitdiffstats
path: root/tools/resources
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-15 12:51:25 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-15 12:51:25 +0000
commit2b9e68e60f3f821b264b34f56d911c62f66d13ef (patch)
treeb52fea92a32bd472ab049cb7773be2d0fa78765a /tools/resources
parent49f85c871a27da12680c2d001e60f9417face418 (diff)
downloadchromium_src-2b9e68e60f3f821b264b34f56d911c62f66d13ef.zip
chromium_src-2b9e68e60f3f821b264b34f56d911c62f66d13ef.tar.gz
chromium_src-2b9e68e60f3f821b264b34f56d911c62f66d13ef.tar.bz2
Make resource repacker work on Windows
Add pragma compatible with cl, and make parser less strict about the stuff around whitelisted_resource_NNNN. R=aurimas@chromium.org,thakis@chromium.org BUG=338759 Review URL: https://codereview.chromium.org/237663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/resources')
-rwxr-xr-xtools/resources/find_used_resources.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/resources/find_used_resources.py b/tools/resources/find_used_resources.py
index 3fc3bce..adce50e 100755
--- a/tools/resources/find_used_resources.py
+++ b/tools/resources/find_used_resources.py
@@ -21,6 +21,8 @@ to print out a UnknownPragma message every time a resource id is used. E.g.:
foo.cc:22:0: warning: ignoring #pragma whitelisted_resource_12345
[-Wunknown-pragmas]
+On Windows, the message is simply a message via __pragma(message(...)).
+
"""
@@ -29,8 +31,8 @@ def GetResourceIdsInPragmaWarnings(input):
for the given input.
"""
used_resources = set()
- unknown_pragma_warning_pattern = re.compile('warning: ignoring #pragma '
- 'whitelisted_resource_(?P<resource_id>[0-9]*) \[-Wunknown-pragmas\]')
+ unknown_pragma_warning_pattern = re.compile(
+ 'whitelisted_resource_(?P<resource_id>[0-9]*)')
for ln in input:
match = unknown_pragma_warning_pattern.search(ln)
if match: