Skip to content

Commit da3c9ff

Browse files
authored
Fix unoptimized fuchsia builds (flutter#20488)
1 parent 16c328d commit da3c9ff

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

shell/platform/fuchsia/flutter/BUILD.gn

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,30 @@ shell_gpu_configuration("fuchsia_legacy_gpu_configuration") {
2121
enable_metal = false
2222
}
2323

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+
2436
template("runner_sources") {
2537
assert(defined(invoker.product), "runner_sources must define product")
2638

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+
}
2846
if (invoker.product) {
29-
extra_defines += [ "DART_PRODUCT" ]
47+
runner_configs += [ ":runner_product_config" ]
3048
}
3149

3250
source_set(target_name) {
@@ -75,10 +93,7 @@ template("runner_sources") {
7593
"vulkan_surface_producer.h",
7694
]
7795

78-
defines = extra_defines
79-
if (flutter_runtime_mode == "profile") {
80-
defines += [ "FLUTTER_PROFILE" ]
81-
}
96+
public_configs = runner_configs
8297

8398
# The use of these dependencies is temporary and will be moved behind the
8499
# embedder API.
@@ -168,9 +183,6 @@ template("flutter_runner") {
168183
if (invoker.product) {
169184
product_suffix = "_product"
170185
}
171-
if (is_debug) {
172-
extra_defines += [ "DEBUG" ] # Needed due to direct dart dependencies.
173-
}
174186

175187
executable(target_name) {
176188
output_name = invoker_output_name

0 commit comments

Comments
 (0)