Skip to content

Commit

Permalink
[fuchsia] Account for the new Dart toolchain. (flutter#4271)
Browse files Browse the repository at this point in the history
  • Loading branch information
pylaligand authored Oct 25, 2017
1 parent a48b5f6 commit f339b2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions build/flutter_app.gni
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
assert(is_fuchsia)

import("//build/dart/dart_package.gni")
import("//build/dart/toolchain.gni")
import("$flutter_root/lib/ui/dart_ui.gni")
import("//topaz/public/dart-pkg/fuchsia/sdk_ext.gni")
import("//topaz/public/dart-pkg/zircon/sdk_ext.gni")
Expand Down Expand Up @@ -62,7 +63,8 @@ template("flutter_jit_app") {
flutter_core_snapshot_isolate_instructions =
"$flutter_core_snapshot_gen_dir/isolate_snapshot_instructions.bin"

dot_packages = "$target_gen_dir/$dart_package_name.packages"
dart_target_gen_dir = get_label_info(":bogus($dart_toolchain)", "target_gen_dir")
dot_packages = "$dart_target_gen_dir/$dart_package_name.packages"
bundle_depfile = "$bundle_path.d"
snapshot_path = "$target_gen_dir/${target_name}_snapshot.bin"
snapshot_depfile = "${snapshot_path}.d"
Expand Down Expand Up @@ -207,7 +209,8 @@ template("flutter_aot_app") {
bundle_path = "$target_gen_dir/${target_name}.flx"
}

dot_packages = "$target_gen_dir/$dart_package_name.packages"
dart_target_gen_dir = get_label_info(":bogus($dart_toolchain)", "target_gen_dir")
dot_packages = "$dart_target_gen_dir/$dart_package_name.packages"
bundle_depfile = "$bundle_path.d"
assembly_path = "$target_gen_dir/$target_name.S"
assembly_depfile = "${assembly_path}.d"
Expand Down Expand Up @@ -257,7 +260,7 @@ template("flutter_aot_app") {
"dart:mozart.internal," + rebase_path(mozart_dart_sdk_ext_lib),
"--url-mapping",
"dart:vmservice_sky," + rebase_path(
"$root_gen_dir/dart-pkg/sky_engine/sdk_ext/vmservice_io.dart"),
"$dart_root_gen_dir/dart-pkg/sky_engine/sdk_ext/vmservice_io.dart"),

"--entry-points-manifest",
rebase_path("$flutter_root/runtime/dart_vm_entry_points.txt"),
Expand Down
9 changes: 7 additions & 2 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import("//third_party/dart/runtime/lib/typed_data_sources.gni")
import("//third_party/dart/utils/generate_patch_sdk.gni")

if (is_fuchsia) {
import("//build/dart/toolchain.gni")
import("//topaz/public/dart-pkg/fuchsia/sdk_ext.gni")
import("//topaz/public/dart-pkg/zircon/sdk_ext.gni")
import("//topaz/public/lib/ui/flutter/sdk_ext/sdk_ext.gni")
Expand Down Expand Up @@ -46,7 +47,11 @@ if (is_fuchsia) {
outputs = [
dot_packages_file
]
deps = dart_deps
deps = []
foreach(dep, dart_deps) {
deps += [ "$dep($dart_toolchain)" ]
}

depfile = "$dot_packages_file.d"

script = "//build/dart/gen_dot_packages.py"
Expand All @@ -58,7 +63,7 @@ if (is_fuchsia) {
"--root-build-dir",
rebase_path(root_build_dir),
"--root-gen-dir",
rebase_path(root_gen_dir),
rebase_path(dart_root_gen_dir),
"--package-name",
"snapshot_root",
"--depfile",
Expand Down

0 comments on commit f339b2f

Please sign in to comment.