OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 template("embed_file") { | 5 template("embed_file") { |
6 assert(defined(invoker.variable)) | 6 assert(defined(invoker.variable)) |
7 assert(defined(invoker.source)) | 7 assert(defined(invoker.source)) |
8 assert(defined(invoker.namespace)) | 8 assert(defined(invoker.namespace)) |
9 | 9 |
10 variable = invoker.variable | 10 variable = invoker.variable |
(...skipping 17 matching lines...) Expand all Loading... |
28 ] | 28 ] |
29 | 29 |
30 if (defined(invoker.testonly)) { | 30 if (defined(invoker.testonly)) { |
31 testonly = invoker.testonly | 31 testonly = invoker.testonly |
32 } | 32 } |
33 if (defined(invoker.deps)) { | 33 if (defined(invoker.deps)) { |
34 deps = invoker.deps | 34 deps = invoker.deps |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
| 38 config_target_name = "__${target_name}_config" |
| 39 config(config_target_name) { |
| 40 cflags = [ "-Wno-narrowing" ] |
| 41 } |
| 42 |
38 source_set(target_name) { | 43 source_set(target_name) { |
39 sources = generator_outputs | 44 sources = generator_outputs |
40 | 45 |
41 if (defined(invoker.testonly)) { | 46 if (defined(invoker.testonly)) { |
42 testonly = invoker.testonly | 47 testonly = invoker.testonly |
43 } | 48 } |
44 | 49 |
| 50 configs += [ ":${config_target_name}" ] |
| 51 |
45 deps = [ | 52 deps = [ |
46 ":${generator_target_name}", | 53 ":${generator_target_name}", |
47 ] | 54 ] |
48 } | 55 } |
49 } | 56 } |
OLD | NEW |