Skip to content

Commit

Permalink
Add tests & --unopt to build_fuchsia_artifacts (flutter#18625)
Browse files Browse the repository at this point in the history
We can build unoptimized code for easier debugging with this flag.
  • Loading branch information
arbreng authored Jun 29, 2020
1 parent fc72577 commit fae8141
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 244 deletions.
10 changes: 8 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,16 @@ if (is_fuchsia) {
"//flutter/fml:fml_tests",
"//flutter/runtime:runtime_tests",
"//flutter/runtime:runtime_tests_next",
"//flutter/shell/common:shell_tests",
"//flutter/shell/common:shell_tests_next",
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_scenic_tests",
"//flutter/shell/platform/fuchsia/flutter:flutter_runner_tests",
]

# TODO(fxb/55353): These break with LTO enabled
if (!enable_lto) {
deps += [
"//flutter/shell/common:shell_tests",
"//flutter/shell/common:shell_tests_next",
]
}
}
}
26 changes: 23 additions & 3 deletions shell/platform/fuchsia/dart_runner/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,22 @@ template("runner") {
assert(defined(invoker.product), "The parameter 'product' must be defined")
assert(defined(invoker.output_name),
"The parameter 'output_name' must be defined")
assert(defined(invoker.extra_deps),
"The parameter 'extra_deps' must be defined")

invoker_output_name = invoker.output_name
extra_defines = invoker.extra_defines
extra_deps = invoker.extra_deps

extra_configs = []
if (is_debug) {
extra_configs += [ "//third_party/dart/build/config:debug" ]
}

extra_defines = []
if (defined(invoker.extra_defines)) {
extra_defines += invoker.extra_defines
}

executable(target_name) {
output_name = invoker_output_name

Expand All @@ -35,6 +46,8 @@ template("runner") {
"service_isolate.h",
]

configs += extra_configs

defines = extra_defines

dart_deps = []
Expand Down Expand Up @@ -75,10 +88,11 @@ template("runner") {
runner("dart_jit_runner_bin") {
output_name = "dart_jit_runner"
product = false
extra_defines = []

if (flutter_runtime_mode == "profile") {
extra_defines += [ "FLUTTER_PROFILE" ]
extra_defines = [ "FLUTTER_PROFILE" ]
}

extra_deps = [
"//third_party/dart/runtime:libdart_jit",
"//third_party/dart/runtime/platform:libdart_platform_jit",
Expand All @@ -88,7 +102,9 @@ runner("dart_jit_runner_bin") {
runner("dart_jit_product_runner_bin") {
output_name = "dart_jit_product_runner"
product = true

extra_defines = [ "DART_PRODUCT" ]

extra_deps = [
"//third_party/dart/runtime:libdart_jit_product",
"//third_party/dart/runtime/platform:libdart_platform_jit_product",
Expand All @@ -98,10 +114,12 @@ runner("dart_jit_product_runner_bin") {
runner("dart_aot_runner_bin") {
output_name = "dart_aot_runner"
product = false

extra_defines = [ "AOT_RUNTIME" ]
if (flutter_runtime_mode == "profile") {
extra_defines += [ "FLUTTER_PROFILE" ]
}

extra_deps = [
"embedder:dart_aot_snapshot_cc",
"//third_party/dart/runtime:libdart_precompiled_runtime",
Expand All @@ -112,10 +130,12 @@ runner("dart_aot_runner_bin") {
runner("dart_aot_product_runner_bin") {
output_name = "dart_aot_product_runner"
product = true

extra_defines = [
"AOT_RUNTIME",
"DART_PRODUCT",
]

extra_deps = [
"embedder:dart_aot_product_snapshot_cc",
"//third_party/dart/runtime:libdart_precompiled_runtime_product",
Expand Down
Loading

0 comments on commit fae8141

Please sign in to comment.