[flutter_runner] Do not use prebuilts just yet (flutter/engine#12340)

This commit is contained in:
Kaushik Iska
2019-09-18 15:31:57 -07:00
committed by GitHub
parent a8cfcfc78d
commit 2c1b30a4f2
9 changed files with 47 additions and 55 deletions

View File

@@ -22,8 +22,9 @@ copy("generate_dart_ui") {
compiled_action("generate_snapshot_bin") {
tool = "//third_party/dart/runtime/bin:gen_snapshot"
if (is_fuchsia || is_fuchsia_host) {
platform_kernel = "//prebuilt/gallium/flutter/artifacts/platform_strong.dill"
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
platform_kernel =
"$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill"
} else {
platform_kernel = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
}
@@ -78,11 +79,6 @@ template("bin_to_assembly") {
deps = invoker.deps
script = "//third_party/dart/runtime/tools/bin_to_assembly.py"
output = invoker.input + ".S"
if (is_fuchsia || is_fuchsia_host) {
output = "$root_out_dir/flutter_runner_patched_sdk/$output"
}
args = [
"--input",
rebase_path(invoker.input),
@@ -126,11 +122,6 @@ template("bin_to_coff") {
deps = invoker.deps
script = "//third_party/dart/runtime/tools/bin_to_coff.py"
output = invoker.input + ".o"
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
output = "$root_out_dir/flutter_runner_patched_sdk/$output"
}
args = [
"--input",
rebase_path(invoker.input),
@@ -217,8 +208,8 @@ bin_to_linkable("platform_strong_dill_linkable") {
deps = [
":kernel_platform_files",
]
if (is_fuchsia || is_fuchsia_host) {
input = "//prebuilt/gallium/flutter/artifacts/platform_strong.dill"
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
input = "$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill"
} else {
input = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
}
@@ -282,9 +273,11 @@ compile_platform("strong_platform") {
}
# Fuchsia's snapshot requires a different platform with extra dart: libraries.
if (is_fuchsia || is_fuchsia_host) {
if ((is_fuchsia || is_fuchsia_host) && !using_fuchsia_sdk) {
group("kernel_platform_files") {
# We use pre-builts for the strong platform file.
public_deps = [
"//topaz/runtime/flutter_runner/kernel:kernel_platform_files",
]
}
} else {
group("kernel_platform_files") {

View File

@@ -29,7 +29,8 @@ group("libdart") {
public_deps = []
if (!(is_fuchsia && using_fuchsia_sdk)) {
if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "release") {
if (flutter_runtime_mode == "profile" ||
flutter_runtime_mode == "release") {
public_deps +=
[ "//third_party/dart/runtime:libdart_precompiled_runtime" ]
} else {
@@ -102,7 +103,8 @@ source_set("runtime") {
# 3. In the executable can enjoy the advantages of the windows preload
# mechanism, speed up I/O.
if (is_win) {
if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "release") {
if (flutter_runtime_mode == "profile" ||
flutter_runtime_mode == "release") {
deps += [ "$flutter_root/lib/snapshot" ]
}
}

View File

@@ -104,7 +104,7 @@ template("jit_runner_package") {
]
if (!invoker.product) {
deps += [ engine_observatory_target ]
deps += [ observatory_target ]
}
binary = "dart_jit${product_suffix}_runner"
@@ -139,7 +139,7 @@ template("jit_runner_package") {
if (!invoker.product) {
resources += [
{
path = rebase_path(engine_observatory_archive_file)
path = rebase_path(observatory_archive_file)
dest = "observatory.tar"
},
]

View File

@@ -9,7 +9,7 @@ import("//topaz/runtime/dart/dart_kernel.gni")
dart_kernel("shim") {
platform_name = "dart_runner"
platform_deps = [ "//topaz/runtime/dart_runner/kernel:kernel_platform_files" ]
platform_path = "$root_out_dir/engine_dart_runner_patched_sdk"
platform_path = "$root_out_dir/dart_runner_patched_sdk"
disable_analysis = true
@@ -24,7 +24,7 @@ dart_kernel("shim") {
dart_kernel("shim_product") {
platform_name = "dart_runner"
platform_deps = [ "//topaz/runtime/dart_runner/kernel:kernel_platform_files" ]
platform_path = "$root_out_dir/engine_dart_runner_patched_sdk"
platform_path = "$root_out_dir/dart_runner_patched_sdk"
disable_analysis = true

View File

@@ -15,8 +15,8 @@ compile_platform("kernel_platform_files") {
libraries_specification_uri = "org-dartlang-sdk:///flutter/shell/platform/fuchsia/dart_runner/kernel/libraries.json"
outputs = [
"$root_out_dir/engine_dart_runner_patched_sdk/platform_strong.dill",
"$root_out_dir/engine_dart_runner_patched_sdk/vm_outline_strong.dill",
"$root_out_dir/dart_runner_patched_sdk/platform_strong.dill",
"$root_out_dir/dart_runner_patched_sdk/vm_outline_strong.dill",
]
args = [
@@ -40,8 +40,7 @@ template("create_kernel_core_snapshot") {
":kernel_platform_files",
]
platform_dill =
"$root_out_dir/engine_dart_runner_patched_sdk/platform_strong.dill"
platform_dill = "$root_out_dir/dart_runner_patched_sdk/platform_strong.dill"
compilation_trace =
"$flutter_root/shell/platform/fuchsia/flutter/compilation_trace.txt"
inputs = [
@@ -64,9 +63,9 @@ template("create_kernel_core_snapshot") {
snapshot_profile,
]
gen_snapshot_to_use = engine_gen_snapshot
gen_snapshot_to_use = gen_snapshot
if (invoker.product) {
gen_snapshot_to_use = engine_gen_snapshot_product
gen_snapshot_to_use = gen_snapshot_product
}
tool = gen_snapshot_to_use
@@ -95,7 +94,8 @@ template("create_kernel_core_snapshot") {
# No asserts in debug or release product.
# No asserts in release with flutter_profile=true (non-product)
# Yes asserts in non-product debug.
if (!invoker.product && (is_debug || !(flutter_runtime_mode == "profile"))) {
if (!invoker.product &&
(is_debug || !(flutter_runtime_mode == "profile"))) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(platform_dill) ]

View File

@@ -101,7 +101,7 @@ template("jit_runner") {
if (!product) {
deps += [
"$flutter_root/shell/platform/fuchsia/runtime/dart/profiler_symbols:flutter_jit_runner",
engine_observatory_target,
observatory_target,
]
}
@@ -119,7 +119,7 @@ template("jit_runner") {
if (!product) {
resources += [
{
path = rebase_path(engine_observatory_archive_file)
path = rebase_path(observatory_archive_file)
dest = "observatory.tar"
},
{
@@ -182,7 +182,7 @@ template("aot_runner") {
if (!product) {
deps += [
"$flutter_root/shell/platform/fuchsia/runtime/dart/profiler_symbols:flutter_aot_runner",
engine_observatory_target,
observatory_target,
]
}
@@ -200,7 +200,7 @@ template("aot_runner") {
if (!product) {
resources += [
{
path = rebase_path(engine_observatory_archive_file)
path = rebase_path(observatory_archive_file)
dest = "observatory.tar"
},
{

View File

@@ -15,8 +15,8 @@ compile_platform("kernel_platform_files") {
libraries_specification_uri = "org-dartlang-sdk:///flutter/shell/platform/fuchsia/flutter/kernel/libraries.json"
outputs = [
"$root_out_dir/engine_flutter_runner_patched_sdk/platform_strong.dill",
"$root_out_dir/engine_flutter_runner_patched_sdk/vm_outline_strong.dill",
"$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill",
"$root_out_dir/flutter_runner_patched_sdk/vm_outline_strong.dill",
]
args = [
@@ -44,7 +44,7 @@ template("core_snapshot") {
]
platform_dill =
"$root_out_dir/engine_flutter_runner_patched_sdk/platform_strong.dill"
"$root_out_dir/flutter_runner_patched_sdk/platform_strong.dill"
compilation_trace =
"$flutter_root/shell/platform/fuchsia/flutter/compilation_trace.txt"
inputs = [
@@ -67,9 +67,9 @@ template("core_snapshot") {
snapshot_profile,
]
gen_snapshot_to_use = engine_gen_snapshot
gen_snapshot_to_use = gen_snapshot
if (invoker.product) {
gen_snapshot_to_use = engine_gen_snapshot_product
gen_snapshot_to_use = gen_snapshot_product
}
tool = gen_snapshot_to_use
@@ -98,7 +98,8 @@ template("core_snapshot") {
# No asserts in debug or release product.
# No asserts in release with flutter_profile=true (non-product)
# Yes asserts in non-product debug.
if (!invoker.product && (is_debug || !(flutter_runtime_mode == "profile"))) {
if (!invoker.product &&
(is_debug || !(flutter_runtime_mode == "profile"))) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(platform_dill) ]

View File

@@ -125,12 +125,11 @@ def CopyToBucketWithMode(source, destination, aot, product, runner_type):
destination = os.path.join(_bucket_directory, destination, mode)
CreateFarPackage(pm_bin, far_base, key_path, destination)
src_patched_sdk_dirname = 'engine_%s_runner_patched_sdk' % runner_type
src_patched_sdk_dir = os.path.join(source_root, src_patched_sdk_dirname)
dest_patched_sdk_dirname = '%s_runner_patched_sdk' % runner_type
dest_sdk_path = os.path.join(destination, dest_patched_sdk_dirname)
patched_sdk_dirname = '%s_runner_patched_sdk' % runner_type
patched_sdk_dir = os.path.join(source_root, patched_sdk_dirname)
dest_sdk_path = os.path.join(destination, patched_sdk_dirname)
if not os.path.exists(dest_sdk_path):
CopyPath(src_patched_sdk_dir, dest_sdk_path)
CopyPath(patched_sdk_dir, dest_sdk_path)
CopyGenSnapshotIfExists(source_root, destination)

View File

@@ -1,16 +1,13 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
engine_gen_snapshot = "//third_party/dart/runtime/bin:gen_snapshot"
engine_gen_snapshot_product =
"//third_party/dart/runtime/bin:gen_snapshot_product"
gen_snapshot = "//third_party/dart/runtime/bin:gen_snapshot"
gen_snapshot_product = "//third_party/dart/runtime/bin:gen_snapshot_product"
engine_observatory_target =
observatory_target =
"//third_party/dart/runtime/observatory:observatory_archive"
engine_observatory_archive_dir =
get_label_info(engine_observatory_target, "target_gen_dir")
engine_observatory_archive_name =
get_label_info(engine_observatory_target, "name")
engine_observatory_archive_file =
"${engine_observatory_archive_dir}/${engine_observatory_archive_name}.tar"
observatory_archive_dir = get_label_info(observatory_target, "target_gen_dir")
observatory_archive_name = get_label_info(observatory_target, "name")
observatory_archive_file =
"${observatory_archive_dir}/${observatory_archive_name}.tar"