Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index e2c383ead8c19b1076c91a8771a6c1306ced8002..9a7308996329d9574ddd73722c8d74039d7bee6b 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -453,6 +453,9 @@ |
# Enable the task manager by default. |
'enable_task_manager%': 1, |
+ # Enables used resource whitelist generation; disabled by default. |
+ 'enable_resource_whitelist_generation%': 0, |
+ |
# Enable FTP support by default. |
'disable_ftp_support%': 0, |
@@ -921,6 +924,7 @@ |
'chroot_cmd%': '<(chroot_cmd)', |
'system_libdir%': '<(system_libdir)', |
'component%': '<(component)', |
+ 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', |
'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
'use_third_party_translations%': '<(use_third_party_translations)', |
'remoting%': '<(remoting)', |
@@ -1827,6 +1831,9 @@ |
['notifications==1', { |
'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_chrome_plugins_flags': [ |
'<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
@@ -3909,6 +3916,11 @@ |
'-mllvm -asan-globals=0', |
], |
}], |
+ ['enable_resource_whitelist_generation==1', { |
+ 'cflags': [ |
+ '-Wunknown-pragmas -Wno-error=unknown-pragmas', |
+ ], |
+ }], |
['android_webview_build==0', { |
'defines': [ |
# The NDK has these things, but doesn't define the constants |