@@ -21,12 +21,30 @@ shell_gpu_configuration("fuchsia_legacy_gpu_configuration") {
21
21
enable_metal = false
22
22
}
23
23
24
+ config (" runner_debug_config" ) {
25
+ defines = [ " DEBUG" ] # Needed due to direct dart dependencies.
26
+ }
27
+
28
+ config (" runner_flutter_profile_config" ) {
29
+ defines = [ " FLUTTER_PROFILE" ]
30
+ }
31
+
32
+ config (" runner_product_config" ) {
33
+ defines = [ " DART_PRODUCT" ]
34
+ }
35
+
24
36
template (" runner_sources" ) {
25
37
assert (defined (invoker .product ), " runner_sources must define product" )
26
38
27
- extra_defines = []
39
+ runner_configs = []
40
+ if (is_debug ) {
41
+ runner_configs += [ " :runner_debug_config" ]
42
+ }
43
+ if (flutter_runtime_mode == " profile" ) {
44
+ runner_configs += [ " :runner_flutter_profile_config" ]
45
+ }
28
46
if (invoker .product ) {
29
- extra_defines += [ " DART_PRODUCT " ]
47
+ runner_configs += [ " :runner_product_config " ]
30
48
}
31
49
32
50
source_set (target_name ) {
@@ -75,10 +93,7 @@ template("runner_sources") {
75
93
" vulkan_surface_producer.h" ,
76
94
]
77
95
78
- defines = extra_defines
79
- if (flutter_runtime_mode == " profile" ) {
80
- defines += [ " FLUTTER_PROFILE" ]
81
- }
96
+ public_configs = runner_configs
82
97
83
98
# The use of these dependencies is temporary and will be moved behind the
84
99
# embedder API.
@@ -168,9 +183,6 @@ template("flutter_runner") {
168
183
if (invoker .product ) {
169
184
product_suffix = " _product"
170
185
}
171
- if (is_debug ) {
172
- extra_defines += [ " DEBUG" ] # Needed due to direct dart dependencies.
173
- }
174
186
175
187
executable (target_name ) {
176
188
output_name = invoker_output_name
0 commit comments