OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Instantiate grit. This will produce a script target to run grit, and a | 5 # Instantiate grit. This will produce a script target to run grit, and a |
6 # static library that compiles the .cc files. | 6 # static library that compiles the .cc files. |
7 # | 7 # |
8 # Parameters | 8 # Parameters |
9 # | 9 # |
10 # source (required) | 10 # source (required) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 # # You can also put deps here if the grit source depends on generated | 78 # # You can also put deps here if the grit source depends on generated |
79 # # files. | 79 # # files. |
80 # } | 80 # } |
81 import("//build/config/chrome_build.gni") | 81 import("//build/config/chrome_build.gni") |
82 import("//build/config/crypto.gni") | 82 import("//build/config/crypto.gni") |
83 import("//build/config/features.gni") | 83 import("//build/config/features.gni") |
84 import("//build/config/ui.gni") | 84 import("//build/config/ui.gni") |
85 import("//third_party/closure_compiler/closure_args.gni") | 85 import("//third_party/closure_compiler/closure_args.gni") |
86 | 86 |
87 declare_args() { | 87 declare_args() { |
88 # Enables used resource whitelist generation. | 88 # Enables used resource whitelist generation. Set for official builds only |
89 enable_resource_whitelist_generation = false | 89 # as a large amount of build output is generated. |
| 90 enable_resource_whitelist_generation = is_android && is_official_build |
90 } | 91 } |
91 | 92 |
| 93 assert(!enable_resource_whitelist_generation || is_android, |
| 94 "resource whitelist generation only works on android") |
| 95 |
92 grit_defines = [] | 96 grit_defines = [] |
93 | 97 |
94 # Mac and iOS want Title Case strings. | 98 # Mac and iOS want Title Case strings. |
95 use_titlecase_in_grd_files = is_mac || is_ios | 99 use_titlecase_in_grd_files = is_mac || is_ios |
96 if (use_titlecase_in_grd_files) { | 100 if (use_titlecase_in_grd_files) { |
97 grit_defines += [ | 101 grit_defines += [ |
98 "-D", | 102 "-D", |
99 "use_titlecase", | 103 "use_titlecase", |
100 ] | 104 ] |
101 } | 105 } |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 if (defined(invoker.configs)) { | 511 if (defined(invoker.configs)) { |
508 configs += invoker.configs | 512 configs += invoker.configs |
509 } | 513 } |
510 | 514 |
511 if (defined(invoker.visibility)) { | 515 if (defined(invoker.visibility)) { |
512 visibility = invoker.visibility | 516 visibility = invoker.visibility |
513 } | 517 } |
514 output_name = grit_output_name | 518 output_name = grit_output_name |
515 } | 519 } |
516 } | 520 } |
OLD | NEW |