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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 # change this to including absolute paths relative to the root gen directory | 350 # change this to including absolute paths relative to the root gen directory |
351 # (like "mycomponent/foo.h"). This config sets up the include path. | 351 # (like "mycomponent/foo.h"). This config sets up the include path. |
352 grit_config = target_name + "_grit_config" | 352 grit_config = target_name + "_grit_config" |
353 config(grit_config) { | 353 config(grit_config) { |
354 if (!defined(invoker.use_qualified_include) || | 354 if (!defined(invoker.use_qualified_include) || |
355 !invoker.use_qualified_include) { | 355 !invoker.use_qualified_include) { |
356 include_dirs = [ output_dir ] | 356 include_dirs = [ output_dir ] |
357 } | 357 } |
358 | 358 |
359 if ((is_linux || is_android) && enable_resource_whitelist_generation) { | 359 if ((is_linux || is_android) && enable_resource_whitelist_generation) { |
360 configs += [ "//build/config/compiler:disable_unknown_pragma" ] | 360 cflags = [ |
| 361 "-Wunknown-pragmas", |
| 362 "-Wno-error=unknown-pragmas", |
| 363 ] |
361 } | 364 } |
362 visibility = target_visibility | 365 visibility = target_visibility |
363 } | 366 } |
364 | 367 |
365 grit_custom_target = target_name + "_grit" | 368 grit_custom_target = target_name + "_grit" |
366 action(grit_custom_target) { | 369 action(grit_custom_target) { |
367 script = "//tools/grit/grit.py" | 370 script = "//tools/grit/grit.py" |
368 | 371 |
369 inputs = [ | 372 inputs = [ |
370 invoker.source, | 373 invoker.source, |
(...skipping 115 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 |