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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 | 175 |
| 176 if (enable_image_loader_extension) { | 176 if (enable_image_loader_extension) { |
| 177 grit_defines += [ | 177 grit_defines += [ |
| 178 "-D", | 178 "-D", |
| 179 "image_loader_extension", | 179 "image_loader_extension", |
| 180 ] | 180 ] |
| 181 } | 181 } |
| 182 | 182 |
| 183 if (is_android) { | 183 if (is_android) { |
| 184 grit_defines += [ | 184 grit_defines += [ |
| 185 "-t", | |
| 186 "android", | |
| 187 "-E", | 185 "-E", |
| 188 "ANDROID_JAVA_TAGGED_ONLY=true", | 186 "ANDROID_JAVA_TAGGED_ONLY=true", |
| 189 ] | 187 ] |
| 190 } | 188 } |
| 191 | 189 |
| 192 if (is_mac || is_ios) { | 190 if (is_mac || is_ios) { |
| 193 grit_defines += [ | 191 grit_defines += [ |
| 194 "-D", | 192 "-D", |
| 195 "scale_factors=2x", | 193 "scale_factors=2x", |
| 196 ] | 194 ] |
| 197 } | 195 } |
| 198 | 196 |
| 199 if (is_ios) { | 197 # When cross-compiling, explicitly pass the target system to grit. |
| 200 grit_defines += [ | 198 if (current_toolchain != host_toolchain) { |
| 201 "-t", | 199 if (is_android) { |
| 202 "ios", | 200 grit_defines += [ |
| 203 ] | 201 "-t", |
| 202 "android", | |
| 203 ] | |
|
Nico
2016/04/04 01:36:08
I wish `gn format` allowed ` grit_defines += [
| |
| 204 } | |
| 205 if (is_ios) { | |
| 206 grit_defines += [ | |
| 207 "-t", | |
| 208 "ios", | |
| 209 ] | |
| 210 } | |
| 211 if (is_linux) { | |
| 212 grit_defines += [ | |
| 213 "-t", | |
| 214 "linux2", | |
| 215 ] | |
| 216 } | |
| 217 if (is_mac) { | |
| 218 grit_defines += [ | |
| 219 "-t", | |
| 220 "darwin", | |
| 221 ] | |
| 222 } | |
| 223 if (is_win) { | |
| 224 grit_defines += [ | |
| 225 "-t", | |
| 226 "win32", | |
| 227 ] | |
| 228 } | |
| 204 } | 229 } |
| 205 | 230 |
| 206 if (enable_extensions) { | 231 if (enable_extensions) { |
| 207 grit_defines += [ | 232 grit_defines += [ |
| 208 "-D", | 233 "-D", |
| 209 "enable_extensions", | 234 "enable_extensions", |
| 210 ] | 235 ] |
| 211 } | 236 } |
| 212 if (enable_media_router) { | 237 if (enable_media_router) { |
| 213 grit_defines += [ | 238 grit_defines += [ |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 480 if (defined(invoker.configs)) { | 505 if (defined(invoker.configs)) { |
| 481 configs += invoker.configs | 506 configs += invoker.configs |
| 482 } | 507 } |
| 483 | 508 |
| 484 if (defined(invoker.visibility)) { | 509 if (defined(invoker.visibility)) { |
| 485 visibility = invoker.visibility | 510 visibility = invoker.visibility |
| 486 } | 511 } |
| 487 output_name = grit_output_name | 512 output_name = grit_output_name |
| 488 } | 513 } |
| 489 } | 514 } |
| OLD | NEW |