Skip to content

Commit

Permalink
[fuchsia] Start building dart_patched_sdk (flutter#10246)
Browse files Browse the repository at this point in the history
* [fuchsia] Start building dart_patched_sdk

* fix path
  • Loading branch information
iskakaushik authored Jul 30, 2019
1 parent dfe68a0 commit 0d66b32
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 207 deletions.
15 changes: 6 additions & 9 deletions shell/platform/fuchsia/dart_runner/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template("jit_runner_package") {
package_dir(target_name) {
deps = [
":dart_jit${product_suffix}_runner_bin",
"$flutter_runner_base/kernel:kernel_core_snapshot${product_suffix}",
"kernel:kernel_core_snapshot${product_suffix}",
]

if (!invoker.product) {
Expand All @@ -109,30 +109,27 @@ template("jit_runner_package") {

meta_dir = "$flutter_root/shell/platform/fuchsia/dart_runner/meta"

snapshot_gen_dir =
"$root_build_dir/gen/flutter/shell/platform/fuchsia/flutter/kernel"

libraries = common_libs

resources = [
{
path = rebase_path(
"$snapshot_gen_dir/vm_isolate_snapshot${product_suffix}.bin")
path =
rebase_path("$target_gen_dir/kernel/vm_data${product_suffix}.bin")
dest = "vm_snapshot_data.bin"
},
{
path = rebase_path(
"$snapshot_gen_dir/vm_snapshot_instructions${product_suffix}.bin")
"$target_gen_dir/kernel/vm_instructions${product_suffix}.bin")
dest = "vm_snapshot_instructions.bin"
},
{
path = rebase_path(
"$snapshot_gen_dir/isolate_snapshot${product_suffix}.bin")
"$target_gen_dir/kernel/isolate_data${product_suffix}.bin")
dest = "isolate_core_snapshot_data.bin"
},
{
path = rebase_path(
"$snapshot_gen_dir/isolate_snapshot_instructions${product_suffix}.bin")
"$target_gen_dir/kernel/isolate_instructions${product_suffix}.bin")
dest = "isolate_core_snapshot_instructions.bin"
},
]
Expand Down
31 changes: 19 additions & 12 deletions shell/platform/fuchsia/dart_runner/kernel/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/dart/dart_tool.gni")
import("//build/compiled_action.gni")
import("//build/fuchsia/sdk.gni")
import("//third_party/dart/utils/compile_platform.gni")
import("//topaz/runtime/dart/dart_component.gni")
import("$flutter_root/common/config.gni")
import("$flutter_root/tools/fuchsia/dart.gni")

compile_platform("kernel_platform_files") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("../../../../")
single_root_base = rebase_path("../../../../../../")

libraries_specification_uri =
"org-dartlang-sdk:///topaz/runtime/dart_runner/kernel/libraries.json"
libraries_specification_uri = "org-dartlang-sdk:///flutter/shell/platform/fuchsia/dart_runner/kernel/libraries.json"

outputs = [
"$root_out_dir/dart_runner_patched_sdk/platform_strong.dill",
Expand All @@ -33,11 +34,15 @@ template("create_kernel_core_snapshot") {
if (invoker.product) {
product_suffix = "_product"
}
action(target_name) {
deps = gen_snapshot_deps + [ ":kernel_platform_files" ]

compiled_action(target_name) {
deps = [
":kernel_platform_files",
]

platform_dill = "$root_out_dir/dart_runner_patched_sdk/platform_strong.dill"
compilation_trace = "//topaz/runtime/flutter_runner/compilation_trace.txt"
compilation_trace =
"$flutter_root/shell/platform/fuchsia/flutter/compilation_trace.txt"
inputs = [
platform_dill,
compilation_trace,
Expand All @@ -58,12 +63,13 @@ template("create_kernel_core_snapshot") {
snapshot_profile,
]

gen_snapshot_to_use = gen_snapshot
if (invoker.product) {
script = gen_snapshot_product
} else {
script = gen_snapshot
gen_snapshot_to_use = gen_snapshot_product
}

tool = gen_snapshot_to_use

args = [
# TODO(FL-117): Re-enable causal async stack traces when this issue is
# addressed.
Expand All @@ -88,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 && (!flutter_profile || is_debug)) {
if (!invoker.product &&
(is_debug || !(flutter_runtime_mode == "profile"))) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(platform_dill) ]
Expand Down
182 changes: 91 additions & 91 deletions shell/platform/fuchsia/dart_runner/kernel/libraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,155 +4,155 @@
"dart_runner": {
"libraries": {
"_builtin": {
"uri": "../../../../third_party/dart/runtime/bin/builtin.dart"
"uri": "../../../../../../third_party/dart/runtime/bin/builtin.dart"
},
"core": {
"patches": [
"../../../../third_party/dart/runtime/lib/core_patch.dart",
"../../../../third_party/dart/runtime/lib/array.dart",
"../../../../third_party/dart/runtime/lib/array_patch.dart",
"../../../../third_party/dart/runtime/lib/bigint_patch.dart",
"../../../../third_party/dart/runtime/lib/bool_patch.dart",
"../../../../third_party/dart/runtime/lib/date_patch.dart",
"../../../../third_party/dart/runtime/lib/double.dart",
"../../../../third_party/dart/runtime/lib/double_patch.dart",
"../../../../third_party/dart/runtime/lib/errors_patch.dart",
"../../../../third_party/dart/runtime/lib/expando_patch.dart",
"../../../../third_party/dart/runtime/lib/function.dart",
"../../../../third_party/dart/runtime/lib/function_patch.dart",
"../../../../third_party/dart/runtime/lib/growable_array.dart",
"../../../../third_party/dart/runtime/lib/identical_patch.dart",
"../../../../third_party/dart/runtime/lib/immutable_map.dart",
"../../../../third_party/dart/runtime/lib/integers.dart",
"../../../../third_party/dart/runtime/lib/integers_patch.dart",
"../../../../third_party/dart/runtime/lib/invocation_mirror_patch.dart",
"../../../../third_party/dart/runtime/lib/lib_prefix.dart",
"../../../../third_party/dart/runtime/lib/map_patch.dart",
"../../../../third_party/dart/runtime/lib/null_patch.dart",
"../../../../third_party/dart/runtime/lib/object_patch.dart",
"../../../../third_party/dart/runtime/lib/regexp_patch.dart",
"../../../../third_party/dart/runtime/lib/stacktrace.dart",
"../../../../third_party/dart/runtime/lib/stopwatch_patch.dart",
"../../../../third_party/dart/runtime/lib/string_buffer_patch.dart",
"../../../../third_party/dart/runtime/lib/string_patch.dart",
"../../../../third_party/dart/runtime/lib/type_patch.dart",
"../../../../third_party/dart/runtime/lib/uri_patch.dart",
"../../../../third_party/dart/runtime/lib/weak_property.dart"
"../../../../../../third_party/dart/runtime/lib/core_patch.dart",
"../../../../../../third_party/dart/runtime/lib/array.dart",
"../../../../../../third_party/dart/runtime/lib/array_patch.dart",
"../../../../../../third_party/dart/runtime/lib/bigint_patch.dart",
"../../../../../../third_party/dart/runtime/lib/bool_patch.dart",
"../../../../../../third_party/dart/runtime/lib/date_patch.dart",
"../../../../../../third_party/dart/runtime/lib/double.dart",
"../../../../../../third_party/dart/runtime/lib/double_patch.dart",
"../../../../../../third_party/dart/runtime/lib/errors_patch.dart",
"../../../../../../third_party/dart/runtime/lib/expando_patch.dart",
"../../../../../../third_party/dart/runtime/lib/function.dart",
"../../../../../../third_party/dart/runtime/lib/function_patch.dart",
"../../../../../../third_party/dart/runtime/lib/growable_array.dart",
"../../../../../../third_party/dart/runtime/lib/identical_patch.dart",
"../../../../../../third_party/dart/runtime/lib/immutable_map.dart",
"../../../../../../third_party/dart/runtime/lib/integers.dart",
"../../../../../../third_party/dart/runtime/lib/integers_patch.dart",
"../../../../../../third_party/dart/runtime/lib/invocation_mirror_patch.dart",
"../../../../../../third_party/dart/runtime/lib/lib_prefix.dart",
"../../../../../../third_party/dart/runtime/lib/map_patch.dart",
"../../../../../../third_party/dart/runtime/lib/null_patch.dart",
"../../../../../../third_party/dart/runtime/lib/object_patch.dart",
"../../../../../../third_party/dart/runtime/lib/regexp_patch.dart",
"../../../../../../third_party/dart/runtime/lib/stacktrace.dart",
"../../../../../../third_party/dart/runtime/lib/stopwatch_patch.dart",
"../../../../../../third_party/dart/runtime/lib/string_buffer_patch.dart",
"../../../../../../third_party/dart/runtime/lib/string_patch.dart",
"../../../../../../third_party/dart/runtime/lib/type_patch.dart",
"../../../../../../third_party/dart/runtime/lib/uri_patch.dart",
"../../../../../../third_party/dart/runtime/lib/weak_property.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/core/core.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/core/core.dart"
},
"zircon": {
"uri": "../../../../topaz/public/dart-pkg/zircon/lib/zircon.dart"
"uri": "../../../../../../flutter/shell/platform/fuchsia/dart-pkg/zircon/lib/zircon.dart"
},
"async": {
"patches": [
"../../../../third_party/dart/runtime/lib/async_patch.dart",
"../../../../third_party/dart/runtime/lib/deferred_load_patch.dart",
"../../../../third_party/dart/runtime/lib/schedule_microtask_patch.dart",
"../../../../third_party/dart/runtime/lib/timer_patch.dart"
"../../../../../../third_party/dart/runtime/lib/async_patch.dart",
"../../../../../../third_party/dart/runtime/lib/deferred_load_patch.dart",
"../../../../../../third_party/dart/runtime/lib/schedule_microtask_patch.dart",
"../../../../../../third_party/dart/runtime/lib/timer_patch.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/async/async.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/async/async.dart"
},
"collection": {
"patches": [
"../../../../third_party/dart/runtime/lib/collection_patch.dart",
"../../../../third_party/dart/runtime/lib/compact_hash.dart"
"../../../../../../third_party/dart/runtime/lib/collection_patch.dart",
"../../../../../../third_party/dart/runtime/lib/compact_hash.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/collection/collection.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/collection/collection.dart"
},
"ffi": {
"patches": [
"../../../../third_party/dart/runtime/lib/ffi_dynamic_library_patch.dart",
"../../../../third_party/dart/runtime/lib/ffi_native_type_patch.dart",
"../../../../third_party/dart/runtime/lib/ffi_patch.dart"
"../../../../../../third_party/dart/runtime/lib/ffi_dynamic_library_patch.dart",
"../../../../../../third_party/dart/runtime/lib/ffi_native_type_patch.dart",
"../../../../../../third_party/dart/runtime/lib/ffi_patch.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/ffi/ffi.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/ffi/ffi.dart"
},
"typed_data": {
"patches": "../../../../third_party/dart/runtime/lib/typed_data_patch.dart",
"uri": "../../../../third_party/dart/sdk/lib/typed_data/typed_data.dart"
"patches": "../../../../../../third_party/dart/runtime/lib/typed_data_patch.dart",
"uri": "../../../../../../third_party/dart/sdk/lib/typed_data/typed_data.dart"
},
"nativewrappers": {
"uri": "../../../../third_party/dart/sdk/lib/html/dartium/nativewrappers.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/html/dartium/nativewrappers.dart"
},
"developer": {
"patches": [
"../../../../third_party/dart/runtime/lib/developer.dart",
"../../../../third_party/dart/runtime/lib/profiler.dart",
"../../../../third_party/dart/runtime/lib/timeline.dart"
"../../../../../../third_party/dart/runtime/lib/developer.dart",
"../../../../../../third_party/dart/runtime/lib/profiler.dart",
"../../../../../../third_party/dart/runtime/lib/timeline.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/developer/developer.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/developer/developer.dart"
},
"isolate": {
"patches": [
"../../../../third_party/dart/runtime/lib/isolate_patch.dart",
"../../../../third_party/dart/runtime/lib/timer_impl.dart"
"../../../../../../third_party/dart/runtime/lib/isolate_patch.dart",
"../../../../../../third_party/dart/runtime/lib/timer_impl.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/isolate/isolate.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/isolate/isolate.dart"
},
"mirrors": {
"patches": [
"../../../../third_party/dart/runtime/lib/mirrors_patch.dart",
"../../../../third_party/dart/runtime/lib/mirrors_impl.dart",
"../../../../third_party/dart/runtime/lib/mirror_reference.dart"
"../../../../../../third_party/dart/runtime/lib/mirrors_patch.dart",
"../../../../../../third_party/dart/runtime/lib/mirrors_impl.dart",
"../../../../../../third_party/dart/runtime/lib/mirror_reference.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/mirrors/mirrors.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/mirrors/mirrors.dart"
},
"_vmservice": {
"uri": "../../../../third_party/dart/sdk/lib/vmservice/vmservice.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/vmservice/vmservice.dart"
},
"io": {
"patches": [
"../../../../third_party/dart/runtime/bin/common_patch.dart",
"../../../../third_party/dart/runtime/bin/directory_patch.dart",
"../../../../third_party/dart/runtime/bin/eventhandler_patch.dart",
"../../../../third_party/dart/runtime/bin/file_patch.dart",
"../../../../third_party/dart/runtime/bin/file_system_entity_patch.dart",
"../../../../third_party/dart/runtime/bin/filter_patch.dart",
"../../../../third_party/dart/runtime/bin/io_service_patch.dart",
"../../../../third_party/dart/runtime/bin/namespace_patch.dart",
"../../../../third_party/dart/runtime/bin/platform_patch.dart",
"../../../../third_party/dart/runtime/bin/process_patch.dart",
"../../../../third_party/dart/runtime/bin/socket_patch.dart",
"../../../../third_party/dart/runtime/bin/stdio_patch.dart",
"../../../../third_party/dart/runtime/bin/secure_socket_patch.dart",
"../../../../third_party/dart/runtime/bin/sync_socket_patch.dart"
"../../../../../../third_party/dart/runtime/bin/common_patch.dart",
"../../../../../../third_party/dart/runtime/bin/directory_patch.dart",
"../../../../../../third_party/dart/runtime/bin/eventhandler_patch.dart",
"../../../../../../third_party/dart/runtime/bin/file_patch.dart",
"../../../../../../third_party/dart/runtime/bin/file_system_entity_patch.dart",
"../../../../../../third_party/dart/runtime/bin/filter_patch.dart",
"../../../../../../third_party/dart/runtime/bin/io_service_patch.dart",
"../../../../../../third_party/dart/runtime/bin/namespace_patch.dart",
"../../../../../../third_party/dart/runtime/bin/platform_patch.dart",
"../../../../../../third_party/dart/runtime/bin/process_patch.dart",
"../../../../../../third_party/dart/runtime/bin/socket_patch.dart",
"../../../../../../third_party/dart/runtime/bin/stdio_patch.dart",
"../../../../../../third_party/dart/runtime/bin/secure_socket_patch.dart",
"../../../../../../third_party/dart/runtime/bin/sync_socket_patch.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/io/io.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/io/io.dart"
},
"_internal": {
"patches": [
"../../../../third_party/dart/runtime/lib/internal_patch.dart",
"../../../../third_party/dart/runtime/lib/class_id_fasta.dart",
"../../../../third_party/dart/runtime/lib/print_patch.dart",
"../../../../third_party/dart/runtime/lib/symbol_patch.dart",
"../../../../third_party/dart/sdk/lib/internal/patch.dart"
"../../../../../../third_party/dart/runtime/lib/internal_patch.dart",
"../../../../../../third_party/dart/runtime/lib/class_id_fasta.dart",
"../../../../../../third_party/dart/runtime/lib/print_patch.dart",
"../../../../../../third_party/dart/runtime/lib/symbol_patch.dart",
"../../../../../../third_party/dart/sdk/lib/internal/patch.dart"
],
"uri": "../../../../third_party/dart/sdk/lib/internal/internal.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/internal/internal.dart"
},
"convert": {
"patches": "../../../../third_party/dart/runtime/lib/convert_patch.dart",
"uri": "../../../../third_party/dart/sdk/lib/convert/convert.dart"
"patches": "../../../../../../third_party/dart/runtime/lib/convert_patch.dart",
"uri": "../../../../../../third_party/dart/sdk/lib/convert/convert.dart"
},
"profiler": {
"uri": "../../../../third_party/dart/sdk/lib/profiler/profiler.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/profiler/profiler.dart"
},
"math": {
"patches": "../../../../third_party/dart/runtime/lib/math_patch.dart",
"uri": "../../../../third_party/dart/sdk/lib/math/math.dart"
"patches": "../../../../../../third_party/dart/runtime/lib/math_patch.dart",
"uri": "../../../../../../third_party/dart/sdk/lib/math/math.dart"
},
"_http": {
"uri": "../../../../third_party/dart/sdk/lib/_http/http.dart"
"uri": "../../../../../../third_party/dart/sdk/lib/_http/http.dart"
},
"fuchsia": {
"uri": "../../../../topaz/public/dart-pkg/fuchsia/lib/fuchsia.dart"
"uri": "../../../../../../flutter/shell/platform/fuchsia/dart-pkg/fuchsia/lib/fuchsia.dart"
},
"fuchsia.builtin": {
"uri": "../../../../topaz/runtime/dart_runner/embedder/builtin.dart"
"uri": "../../../../../../flutter/shell/platform/fuchsia/dart_runner/embedder/builtin.dart"
},
"vmservice_io": {
"uri": "../../../../third_party/dart/runtime/bin/vmservice/vmservice_io.dart"
"uri": "../../../../../../third_party/dart/runtime/bin/vmservice/vmservice_io.dart"
}
}
}
}
}
Loading

0 comments on commit 0d66b32

Please sign in to comment.