@@ -21,98 +21,120 @@ shell_gpu_configuration("fuchsia_legacy_gpu_configuration") {
21
21
enable_metal = false
22
22
}
23
23
24
- source_set (" flutter_runner_sources" ) {
25
- sources = [
26
- " accessibility_bridge.cc" ,
27
- " accessibility_bridge.h" ,
28
- " component.cc" ,
29
- " component.h" ,
30
- " compositor_context.cc" ,
31
- " compositor_context.h" ,
32
- " engine.cc" ,
33
- " engine.h" ,
34
- " flutter_runner_product_configuration.cc" ,
35
- " flutter_runner_product_configuration.h" ,
36
- " fuchsia_intl.cc" ,
37
- " fuchsia_intl.h" ,
38
- " isolate_configurator.cc" ,
39
- " isolate_configurator.h" ,
40
- " logging.h" ,
41
- " loop.cc" ,
42
- " loop.h" ,
43
- " platform_view.cc" ,
44
- " platform_view.h" ,
45
- " runner.cc" ,
46
- " runner.h" ,
47
- " session_connection.cc" ,
48
- " session_connection.h" ,
49
- " surface.cc" ,
50
- " surface.h" ,
51
- " task_observers.cc" ,
52
- " task_observers.h" ,
53
- " task_runner_adapter.cc" ,
54
- " task_runner_adapter.h" ,
55
- " thread.cc" ,
56
- " thread.h" ,
57
- " unique_fdio_ns.h" ,
58
- " vsync_recorder.cc" ,
59
- " vsync_recorder.h" ,
60
- " vsync_waiter.cc" ,
61
- " vsync_waiter.h" ,
62
- " vulkan_surface.cc" ,
63
- " vulkan_surface.h" ,
64
- " vulkan_surface_pool.cc" ,
65
- " vulkan_surface_pool.h" ,
66
- " vulkan_surface_producer.cc" ,
67
- " vulkan_surface_producer.h" ,
68
- ]
24
+ template (" runner_sources" ) {
25
+ assert (defined (invoker .product ), " runner_sources must define product" )
69
26
70
- # The use of these dependencies is temporary and will be moved behind the
71
- # embedder API.
72
- flutter_public_deps = [
73
- " //flutter/flow:flow_fuchsia_legacy" ,
74
- " //flutter/lib/ui:ui_fuchsia_legacy" ,
75
- " //flutter/runtime:runtime_fuchsia_legacy" ,
76
- " //flutter/shell/common:common_fuchsia_legacy" ,
77
- ]
78
- flutter_deps = [
79
- " :fuchsia_legacy_gpu_configuration" ,
80
- " //flutter/assets" ,
81
- " //flutter/common" ,
82
- " //flutter/fml" ,
83
- " //flutter/vulkan" ,
84
- ]
27
+ extra_defines = []
28
+ if (invoker .product ) {
29
+ extra_defines += [ " DART_PRODUCT" ]
30
+ }
85
31
86
- public_deps = [
87
- " $fuchsia_sdk_root /pkg:scenic_cpp" ,
88
- " $fuchsia_sdk_root /pkg:sys_cpp" ,
89
- " //flutter/shell/platform/fuchsia/runtime/dart/utils" ,
90
- ] + flutter_public_deps
32
+ source_set (target_name ) {
33
+ sources = [
34
+ " accessibility_bridge.cc" ,
35
+ " accessibility_bridge.h" ,
36
+ " component.cc" ,
37
+ " component.h" ,
38
+ " compositor_context.cc" ,
39
+ " compositor_context.h" ,
40
+ " engine.cc" ,
41
+ " engine.h" ,
42
+ " flutter_runner_product_configuration.cc" ,
43
+ " flutter_runner_product_configuration.h" ,
44
+ " fuchsia_intl.cc" ,
45
+ " fuchsia_intl.h" ,
46
+ " isolate_configurator.cc" ,
47
+ " isolate_configurator.h" ,
48
+ " logging.h" ,
49
+ " loop.cc" ,
50
+ " loop.h" ,
51
+ " platform_view.cc" ,
52
+ " platform_view.h" ,
53
+ " runner.cc" ,
54
+ " runner.h" ,
55
+ " session_connection.cc" ,
56
+ " session_connection.h" ,
57
+ " surface.cc" ,
58
+ " surface.h" ,
59
+ " task_observers.cc" ,
60
+ " task_observers.h" ,
61
+ " task_runner_adapter.cc" ,
62
+ " task_runner_adapter.h" ,
63
+ " thread.cc" ,
64
+ " thread.h" ,
65
+ " unique_fdio_ns.h" ,
66
+ " vsync_recorder.cc" ,
67
+ " vsync_recorder.h" ,
68
+ " vsync_waiter.cc" ,
69
+ " vsync_waiter.h" ,
70
+ " vulkan_surface.cc" ,
71
+ " vulkan_surface.h" ,
72
+ " vulkan_surface_pool.cc" ,
73
+ " vulkan_surface_pool.h" ,
74
+ " vulkan_surface_producer.cc" ,
75
+ " vulkan_surface_producer.h" ,
76
+ ]
91
77
92
- deps = [
93
- " $fuchsia_sdk_root /fidl:fuchsia.accessibility.semantics" ,
94
- " $fuchsia_sdk_root /fidl:fuchsia.fonts" ,
95
- " $fuchsia_sdk_root /fidl:fuchsia.images" ,
96
- " $fuchsia_sdk_root /fidl:fuchsia.intl" ,
97
- " $fuchsia_sdk_root /fidl:fuchsia.io" ,
98
- " $fuchsia_sdk_root /fidl:fuchsia.sys" ,
99
- " $fuchsia_sdk_root /fidl:fuchsia.ui.app" ,
100
- " $fuchsia_sdk_root /fidl:fuchsia.ui.scenic" ,
101
- " $fuchsia_sdk_root /pkg:async-cpp" ,
102
- " $fuchsia_sdk_root /pkg:async-default" ,
103
- " $fuchsia_sdk_root /pkg:async-loop" ,
104
- " $fuchsia_sdk_root /pkg:async-loop-cpp" ,
105
- " $fuchsia_sdk_root /pkg:fdio" ,
106
- " $fuchsia_sdk_root /pkg:fidl_cpp" ,
107
- " $fuchsia_sdk_root /pkg:syslog" ,
108
- " $fuchsia_sdk_root /pkg:trace" ,
109
- " $fuchsia_sdk_root /pkg:trace-engine" ,
110
- " $fuchsia_sdk_root /pkg:trace-provider-so" ,
111
- " $fuchsia_sdk_root /pkg:vfs_cpp" ,
112
- " $fuchsia_sdk_root /pkg:zx" ,
113
- " //flutter/shell/platform/fuchsia/dart-pkg/fuchsia" ,
114
- " //flutter/shell/platform/fuchsia/dart-pkg/zircon" ,
115
- ] + flutter_deps
78
+ defines = extra_defines
79
+ if (flutter_runtime_mode == " profile" ) {
80
+ defines += [ " FLUTTER_PROFILE" ]
81
+ }
82
+
83
+ # The use of these dependencies is temporary and will be moved behind the
84
+ # embedder API.
85
+ flutter_public_deps = [
86
+ " //flutter/flow:flow_fuchsia_legacy" ,
87
+ " //flutter/lib/ui:ui_fuchsia_legacy" ,
88
+ " //flutter/runtime:runtime_fuchsia_legacy" ,
89
+ " //flutter/shell/common:common_fuchsia_legacy" ,
90
+ ]
91
+ flutter_deps = [
92
+ " :fuchsia_legacy_gpu_configuration" ,
93
+ " //flutter/assets" ,
94
+ " //flutter/common" ,
95
+ " //flutter/fml" ,
96
+ " //flutter/vulkan" ,
97
+ ]
98
+
99
+ public_deps = [
100
+ " $fuchsia_sdk_root /pkg:scenic_cpp" ,
101
+ " $fuchsia_sdk_root /pkg:sys_cpp" ,
102
+ " //flutter/shell/platform/fuchsia/runtime/dart/utils" ,
103
+ ] + flutter_public_deps
104
+
105
+ deps = [
106
+ " $fuchsia_sdk_root /fidl:fuchsia.accessibility.semantics" ,
107
+ " $fuchsia_sdk_root /fidl:fuchsia.fonts" ,
108
+ " $fuchsia_sdk_root /fidl:fuchsia.images" ,
109
+ " $fuchsia_sdk_root /fidl:fuchsia.intl" ,
110
+ " $fuchsia_sdk_root /fidl:fuchsia.io" ,
111
+ " $fuchsia_sdk_root /fidl:fuchsia.sys" ,
112
+ " $fuchsia_sdk_root /fidl:fuchsia.ui.app" ,
113
+ " $fuchsia_sdk_root /fidl:fuchsia.ui.scenic" ,
114
+ " $fuchsia_sdk_root /pkg:async-cpp" ,
115
+ " $fuchsia_sdk_root /pkg:async-default" ,
116
+ " $fuchsia_sdk_root /pkg:async-loop" ,
117
+ " $fuchsia_sdk_root /pkg:async-loop-cpp" ,
118
+ " $fuchsia_sdk_root /pkg:fdio" ,
119
+ " $fuchsia_sdk_root /pkg:fidl_cpp" ,
120
+ " $fuchsia_sdk_root /pkg:syslog" ,
121
+ " $fuchsia_sdk_root /pkg:trace" ,
122
+ " $fuchsia_sdk_root /pkg:trace-engine" ,
123
+ " $fuchsia_sdk_root /pkg:trace-provider-so" ,
124
+ " $fuchsia_sdk_root /pkg:vfs_cpp" ,
125
+ " $fuchsia_sdk_root /pkg:zx" ,
126
+ " //flutter/shell/platform/fuchsia/dart-pkg/fuchsia" ,
127
+ " //flutter/shell/platform/fuchsia/dart-pkg/zircon" ,
128
+ ] + flutter_deps
129
+ }
130
+ }
131
+
132
+ runner_sources (" flutter_runner_sources" ) {
133
+ product = false
134
+ }
135
+
136
+ runner_sources (" flutter_runner_sources_product" ) {
137
+ product = true
116
138
}
117
139
118
140
# Things that explicitly being excluded:
@@ -142,9 +164,9 @@ template("flutter_runner") {
142
164
invoker_output_name = invoker .output_name
143
165
extra_deps = invoker .extra_deps
144
166
145
- extra_defines = []
146
- if (defined ( invoker .extra_defines ) ) {
147
- extra_defines += invoker .extra_defines
167
+ product_suffix = " "
168
+ if (invoker .product ) {
169
+ product_suffix = " _product "
148
170
}
149
171
if (is_debug ) {
150
172
extra_defines += [ " DEBUG" ] # Needed due to direct dart dependencies.
@@ -153,12 +175,10 @@ template("flutter_runner") {
153
175
executable (target_name ) {
154
176
output_name = invoker_output_name
155
177
156
- defines = extra_defines
157
-
158
178
sources = [ " main.cc" ]
159
179
160
180
deps = [
161
- " :flutter_runner_sources" ,
181
+ " :flutter_runner_sources${ product_suffix } " ,
162
182
" $fuchsia_sdk_root /pkg:async-loop-cpp" ,
163
183
" $fuchsia_sdk_root /pkg:trace" ,
164
184
" $fuchsia_sdk_root /pkg:trace-provider-so" ,
@@ -180,11 +200,6 @@ flutter_runner("jit") {
180
200
output_name = " flutter_jit_runner"
181
201
product = false
182
202
183
- extra_defines = []
184
- if (flutter_runtime_mode == " profile" ) {
185
- extra_defines += [ " FLUTTER_PROFILE" ]
186
- }
187
-
188
203
extra_deps = [
189
204
" //third_party/dart/runtime:libdart_jit" ,
190
205
" //third_party/dart/runtime/platform:libdart_platform_jit" ,
@@ -195,8 +210,6 @@ flutter_runner("jit_product") {
195
210
output_name = " flutter_jit_product_runner"
196
211
product = true
197
212
198
- extra_defines = [ " DART_PRODUCT" ]
199
-
200
213
extra_deps = [
201
214
" //third_party/dart/runtime:libdart_jit_product" ,
202
215
" //third_party/dart/runtime/platform:libdart_platform_jit_product" ,
@@ -207,11 +220,6 @@ flutter_runner("aot") {
207
220
output_name = " flutter_aot_runner"
208
221
product = false
209
222
210
- extra_defines = []
211
- if (flutter_runtime_mode == " profile" ) {
212
- extra_defines += [ " FLUTTER_PROFILE" ]
213
- }
214
-
215
223
extra_deps = [
216
224
" //third_party/dart/runtime:libdart_precompiled_runtime" ,
217
225
" //third_party/dart/runtime/platform:libdart_platform_precompiled_runtime" ,
@@ -222,8 +230,6 @@ flutter_runner("aot_product") {
222
230
output_name = " flutter_aot_product_runner"
223
231
product = true
224
232
225
- extra_defines = [ " DART_PRODUCT" ]
226
-
227
233
extra_deps = [
228
234
" //third_party/dart/runtime:libdart_precompiled_runtime_product" ,
229
235
" //third_party/dart/runtime/platform:libdart_platform_precompiled_runtime_product" ,
0 commit comments