Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fae8141

Browse files
authored
Add tests & --unopt to build_fuchsia_artifacts (#18625)
We can build unoptimized code for easier debugging with this flag.
1 parent fc72577 commit fae8141

File tree

5 files changed

+219
-244
lines changed

5 files changed

+219
-244
lines changed

BUILD.gn

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,16 @@ if (is_fuchsia) {
169169
"//flutter/fml:fml_tests",
170170
"//flutter/runtime:runtime_tests",
171171
"//flutter/runtime:runtime_tests_next",
172-
"//flutter/shell/common:shell_tests",
173-
"//flutter/shell/common:shell_tests_next",
174172
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_scenic_tests",
175173
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_tests",
176174
]
175+
176+
# TODO(fxb/55353): These break with LTO enabled
177+
if (!enable_lto) {
178+
deps += [
179+
"//flutter/shell/common:shell_tests",
180+
"//flutter/shell/common:shell_tests_next",
181+
]
182+
}
177183
}
178184
}

shell/platform/fuchsia/dart_runner/BUILD.gn

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@ template("runner") {
1414
assert(defined(invoker.product), "The parameter 'product' must be defined")
1515
assert(defined(invoker.output_name),
1616
"The parameter 'output_name' must be defined")
17+
assert(defined(invoker.extra_deps),
18+
"The parameter 'extra_deps' must be defined")
1719

1820
invoker_output_name = invoker.output_name
19-
extra_defines = invoker.extra_defines
2021
extra_deps = invoker.extra_deps
2122

23+
extra_configs = []
24+
if (is_debug) {
25+
extra_configs += [ "//third_party/dart/build/config:debug" ]
26+
}
27+
28+
extra_defines = []
29+
if (defined(invoker.extra_defines)) {
30+
extra_defines += invoker.extra_defines
31+
}
32+
2233
executable(target_name) {
2334
output_name = invoker_output_name
2435

@@ -35,6 +46,8 @@ template("runner") {
3546
"service_isolate.h",
3647
]
3748

49+
configs += extra_configs
50+
3851
defines = extra_defines
3952

4053
dart_deps = []
@@ -75,10 +88,11 @@ template("runner") {
7588
runner("dart_jit_runner_bin") {
7689
output_name = "dart_jit_runner"
7790
product = false
78-
extra_defines = []
91+
7992
if (flutter_runtime_mode == "profile") {
80-
extra_defines += [ "FLUTTER_PROFILE" ]
93+
extra_defines = [ "FLUTTER_PROFILE" ]
8194
}
95+
8296
extra_deps = [
8397
"//third_party/dart/runtime:libdart_jit",
8498
"//third_party/dart/runtime/platform:libdart_platform_jit",
@@ -88,7 +102,9 @@ runner("dart_jit_runner_bin") {
88102
runner("dart_jit_product_runner_bin") {
89103
output_name = "dart_jit_product_runner"
90104
product = true
105+
91106
extra_defines = [ "DART_PRODUCT" ]
107+
92108
extra_deps = [
93109
"//third_party/dart/runtime:libdart_jit_product",
94110
"//third_party/dart/runtime/platform:libdart_platform_jit_product",
@@ -98,10 +114,12 @@ runner("dart_jit_product_runner_bin") {
98114
runner("dart_aot_runner_bin") {
99115
output_name = "dart_aot_runner"
100116
product = false
117+
101118
extra_defines = [ "AOT_RUNTIME" ]
102119
if (flutter_runtime_mode == "profile") {
103120
extra_defines += [ "FLUTTER_PROFILE" ]
104121
}
122+
105123
extra_deps = [
106124
"embedder:dart_aot_snapshot_cc",
107125
"//third_party/dart/runtime:libdart_precompiled_runtime",
@@ -112,10 +130,12 @@ runner("dart_aot_runner_bin") {
112130
runner("dart_aot_product_runner_bin") {
113131
output_name = "dart_aot_product_runner"
114132
product = true
133+
115134
extra_defines = [
116135
"AOT_RUNTIME",
117136
"DART_PRODUCT",
118137
]
138+
119139
extra_deps = [
120140
"embedder:dart_aot_product_snapshot_cc",
121141
"//third_party/dart/runtime:libdart_precompiled_runtime_product",

0 commit comments

Comments
 (0)