Skip to content

Commit

Permalink
Remove sky_snapshot sources (flutter#3471)
Browse files Browse the repository at this point in the history
* Remove sky_snapshot sources

* update licenses
  • Loading branch information
goderbauer authored Mar 14, 2017
1 parent aa2c244 commit cd417b0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 383 deletions.
2 changes: 0 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ group("flutter") {
"//flutter/examples",
"//flutter/flow",
"//flutter/runtime",
"//flutter/snapshotter",
"//flutter/snapshotter($host_toolchain)",
]
}

Expand Down
22 changes: 15 additions & 7 deletions build/flutter_app.gni
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ template("flutter_app") {
bundle_name = "${target_name}.flx"
}

flutter_snapshot_label = "//flutter/snapshotter($host_toolchain)"
flutter_snapshot_label = "//dart/runtime/bin:gen_snapshot($host_toolchain)"
flutter_snapshot_dir = get_label_info(flutter_snapshot_label, "root_out_dir")
flutter_snapshot = "$flutter_snapshot_dir/sky_snapshot"
flutter_snapshot = "$flutter_snapshot_dir/gen_snapshot"

flutter_core_snapshot_label = "//flutter/lib/snapshot:generate_snapshot_bin"
flutter_core_snapshot_gen_dir = get_label_info(flutter_core_snapshot_label, "target_gen_dir")
flutter_core_snapshot_vm_data = "$flutter_core_snapshot_gen_dir/vm_isolate_snapshot.bin"
flutter_core_snapshot_isolate_data = "$flutter_core_snapshot_gen_dir/isolate_snapshot.bin"

dart_binary_label = "//dart/runtime/bin:dart($host_toolchain)"
dart_binary_dir = get_label_info(dart_binary_label, "root_out_dir")
Expand Down Expand Up @@ -102,23 +107,26 @@ template("flutter_app") {
args = [
"--snapshotter-path",
rebase_path(flutter_snapshot),
"--app-dir",
rebase_path("."),
"--vm-snapshot-data",
rebase_path(flutter_core_snapshot_vm_data),
"--isolate-snapshot-data",
rebase_path(flutter_core_snapshot_isolate_data),
"--main-dart",
rebase_path(main_dart),
"--packages",
rebase_path(dot_packages),
"--snapshot",
rebase_path(snapshot_path),
rebase_path(snapshot_path, root_build_dir),
"--depfile",
rebase_path(depfile_path),
"--build-output",
rebase_path(snapshot_path, root_build_dir),
"--root-build-dir",
rebase_path(root_build_dir),
]

deps = [
":$dart_package_name",
flutter_snapshot_label,
flutter_core_snapshot_label,
]

if (defined(invoker.deps)) {
Expand Down
22 changes: 13 additions & 9 deletions build/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,33 @@ def main():

parser.add_argument('--snapshotter-path', type=str, required=True,
help='The Flutter snapshotter')
parser.add_argument('--app-dir', type=str, required=True,
help='The root of the app')
parser.add_argument('--vm-snapshot-data', type=str, required=True,
help='Path to vm_isolate_snapshot.bin')
parser.add_argument('--isolate-snapshot-data', type=str, required=True,
help='Path to isolate_snapshot.bin')
parser.add_argument('--main-dart', type=str, required=True,
help='The main.dart file to use')
parser.add_argument('--packages', type=str, required=True,
help='The package map to use')
parser.add_argument('--snapshot', type=str, required=True,
help='Path to application snapshot')
help='Where to output application snapshot')
parser.add_argument('--depfile', type=str, required=True,
help='Where to output dependency information')
parser.add_argument('--build-output', type=str, required=True,
help='Target name used in the depfile')
parser.add_argument('--root-build-dir', type=str, required=True,
help='The root build dir for --depfile and --snapshot')

args = parser.parse_args()

result = subprocess.call([
args.snapshotter_path,
'--snapshot_kind=script',
'--vm_snapshot_data=%s' % args.vm_snapshot_data,
'--isolate_snapshot_data=%s' % args.isolate_snapshot_data,
'--packages=%s' % args.packages,
'--snapshot=%s' % args.snapshot,
'--depfile=%s' % args.depfile,
'--build-output=%s' % args.build_output,
'--script_snapshot=%s' % args.snapshot,
'--dependencies=%s' % args.depfile,
args.main_dart,
], cwd=args.app_dir)
], cwd=args.root_build_dir)

return result

Expand Down
4 changes: 0 additions & 4 deletions sky/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ group("sky") {
if (!is_fuchsia) {
deps += [ "//flutter/shell" ]
}

if (dart_host_toolchain == host_toolchain) {
deps += [ "//flutter/snapshotter($dart_host_toolchain)" ]
}
}
30 changes: 0 additions & 30 deletions snapshotter/BUILD.gn

This file was deleted.

Loading

0 comments on commit cd417b0

Please sign in to comment.