Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 # grit_flags = [ "-E", "foo=bar" ] # Optional extra flags. | 77 # grit_flags = [ "-E", "foo=bar" ] # Optional extra flags. |
| 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 | 85 |
| 86 declare_args() { | 86 declare_args() { |
| 87 # Enables used resource whitelist generation. | 87 # Enables used resource whitelist generation. Set for official builds only |
| 88 enable_resource_whitelist_generation = false | 88 # as a large amount of build output is generated. |
| 89 enable_resource_whitelist_generation = is_android && is_official_build | |
| 90 assert(!enable_resource_whitelist_generation || is_android, | |
| 91 "resource whitelist generation only works on android") | |
|
Dirk Pranke
2016/08/03 00:59:07
The assert should be outside of the declare_args()
estevenson
2016/08/03 13:51:14
Done.
| |
| 89 } | 92 } |
| 90 | 93 |
| 91 grit_defines = [] | 94 grit_defines = [] |
| 92 | 95 |
| 93 # Mac and iOS want Title Case strings. | 96 # Mac and iOS want Title Case strings. |
| 94 use_titlecase_in_grd_files = is_mac || is_ios | 97 use_titlecase_in_grd_files = is_mac || is_ios |
| 95 if (use_titlecase_in_grd_files) { | 98 if (use_titlecase_in_grd_files) { |
| 96 grit_defines += [ | 99 grit_defines += [ |
| 97 "-D", | 100 "-D", |
| 98 "use_titlecase", | 101 "use_titlecase", |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 if (defined(invoker.configs)) { | 489 if (defined(invoker.configs)) { |
| 487 configs += invoker.configs | 490 configs += invoker.configs |
| 488 } | 491 } |
| 489 | 492 |
| 490 if (defined(invoker.visibility)) { | 493 if (defined(invoker.visibility)) { |
| 491 visibility = invoker.visibility | 494 visibility = invoker.visibility |
| 492 } | 495 } |
| 493 output_name = grit_output_name | 496 output_name = grit_output_name |
| 494 } | 497 } |
| 495 } | 498 } |
| OLD | NEW |