Commit 1a43cc57 authored by aurimas@chromium.org's avatar aurimas@chromium.org

Add a new gyp flag to enable resource whitelist generation.

BUG=338759
NOTRY=true

Review URL: https://codereview.chromium.org/184783005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255710 0039d316-1c4b-4281-b951-d872f2087c98
parent 8862ccca
...@@ -453,6 +453,9 @@ ...@@ -453,6 +453,9 @@
# Enable the task manager by default. # Enable the task manager by default.
'enable_task_manager%': 1, 'enable_task_manager%': 1,
# Enables used resource whitelist generation; disabled by default.
'enable_resource_whitelist_generation%': 0,
# Enable FTP support by default. # Enable FTP support by default.
'disable_ftp_support%': 0, 'disable_ftp_support%': 0,
...@@ -921,6 +924,7 @@ ...@@ -921,6 +924,7 @@
'chroot_cmd%': '<(chroot_cmd)', 'chroot_cmd%': '<(chroot_cmd)',
'system_libdir%': '<(system_libdir)', 'system_libdir%': '<(system_libdir)',
'component%': '<(component)', 'component%': '<(component)',
'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)',
'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
'use_third_party_translations%': '<(use_third_party_translations)', 'use_third_party_translations%': '<(use_third_party_translations)',
'remoting%': '<(remoting)', 'remoting%': '<(remoting)',
...@@ -1827,6 +1831,9 @@ ...@@ -1827,6 +1831,9 @@
['notifications==1', { ['notifications==1', {
'grit_defines': ['-D', 'enable_notifications'], 'grit_defines': ['-D', 'enable_notifications'],
}], }],
['enable_resource_whitelist_generation==1', {
'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("{textual_id}") {numeric_id}'],
}],
['clang_use_chrome_plugins==1 and OS!="win"', { ['clang_use_chrome_plugins==1 and OS!="win"', {
'clang_chrome_plugins_flags': [ 'clang_chrome_plugins_flags': [
'<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
...@@ -3909,6 +3916,11 @@ ...@@ -3909,6 +3916,11 @@
'-mllvm -asan-globals=0', '-mllvm -asan-globals=0',
], ],
}], }],
['enable_resource_whitelist_generation==1', {
'cflags': [
'-Wunknown-pragmas -Wno-error=unknown-pragmas',
],
}],
['android_webview_build==0', { ['android_webview_build==0', {
'defines': [ 'defines': [
# The NDK has these things, but doesn't define the constants # The NDK has these things, but doesn't define the constants
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
# This makes it possible to add more defines in specific targets, # This makes it possible to add more defines in specific targets,
# instead of build/common.gypi . # instead of build/common.gypi .
'grit_additional_defines%': [], 'grit_additional_defines%': [],
'grit_rc_header_format%': [],
}, },
'inputs': [ 'inputs': [
'<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) ' '<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) '
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
'-f', '<(grit_resource_ids)', '-f', '<(grit_resource_ids)',
'-o', '<(grit_out_dir)', '-o', '<(grit_out_dir)',
'<@(grit_defines)', '<@(grit_defines)',
'<@(grit_additional_defines)' ], '<@(grit_additional_defines)',
'<@(grit_rc_header_format)'],
'message': 'Generating resources from <(grit_grd_file)', 'message': 'Generating resources from <(grit_grd_file)',
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment