summaryrefslogtreecommitdiffstats
path: root/build/grit_action.gypi
diff options
context:
space:
mode:
authorolivierrobin <olivierrobin@chromium.org>2015-02-09 09:04:57 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-09 17:05:22 +0000
commit2310fc2b85b31504de87ba22d9d14fc406ed3147 (patch)
tree5b8222484f6cfe4d49d1e7c47c268b3115aed180 /build/grit_action.gypi
parent8a822d0b1f720c95d71b62b3b4c3c6e5bd014b43 (diff)
downloadchromium_src-2310fc2b85b31504de87ba22d9d14fc406ed3147.zip
chromium_src-2310fc2b85b31504de87ba22d9d14fc406ed3147.tar.gz
chromium_src-2310fc2b85b31504de87ba22d9d14fc406ed3147.tar.bz2
Change grit whitelist to a string parameter
This CL changes the grit_whitelist parameter to be a string instead of a part of grit_defines. This allow user to override the parameter with another file. The goal of this is to allow creating bundles with their own whitelists. At the moment, if you want to create a small executable (i.e. an ios extension) that only uses 3 strings, you are required to include all the strings whitelisted by the main chrome bundle. By allowing to override the whitelist argument (instead of only appending the argument array, it will allow to specify a specific whitelist for a specific target. BUG=456837 Review URL: https://codereview.chromium.org/862043002 Cr-Commit-Position: refs/heads/master@{#315324}
Diffstat (limited to 'build/grit_action.gypi')
-rw-r--r--build/grit_action.gypi13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/grit_action.gypi b/build/grit_action.gypi
index 15ead28..462fb4c 100644
--- a/build/grit_action.gypi
+++ b/build/grit_action.gypi
@@ -21,6 +21,7 @@
# instead of build/common.gypi .
'grit_additional_defines%': [],
'grit_rc_header_format%': [],
+ 'grit_whitelist%': '',
'conditions': [
# These scripts can skip writing generated files if they are identical
@@ -36,6 +37,17 @@
}],
],
},
+ 'conditions': [
+ ['"<(grit_whitelist)"==""', {
+ 'variables': {
+ 'grit_whitelist_flag': [],
+ }
+ }, {
+ 'variables': {
+ 'grit_whitelist_flag': ['-w', '<(grit_whitelist)'],
+ }
+ }]
+ ],
'inputs': [
'<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) '
'--inputs <(grit_grd_file) -f "<(grit_resource_ids)")',
@@ -51,6 +63,7 @@
'-o', '<(grit_out_dir)',
'--write-only-new=<(write_only_new)',
'<@(grit_defines)',
+ '<@(grit_whitelist_flag)',
'<@(grit_additional_defines)',
'<@(grit_rc_header_format)'],
'message': 'Generating resources from <(grit_grd_file)',