mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[SDK] Add frontend_server AOT snapshot to the SDK
The size of the AppJIT snapshot that is already in the SDK is around 44.53 MB. The size of this new AOT snapshot is around 14.57 MB. We temporarily need to have both snapshots in the SDK, but we plan on removing the AppJIT snapshot. Change-Id: I1247f0ecbd3d05d18d22c8b36ac078e26de2c183 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322180 Commit-Queue: Derek Xu <derekx@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
00223b8952
commit
2e6203df1f
2 changed files with 27 additions and 1 deletions
21
sdk/BUILD.gn
21
sdk/BUILD.gn
|
@ -47,6 +47,7 @@ declare_args() {
|
|||
# ........dartdev.dart.snapshot (app-jit snapshot or kernel dill file)
|
||||
# ........dartdevc.dart.snapshot
|
||||
# ........dds.dart.snapshot
|
||||
# ........frontend_server_aot.dart.snapshot (AOT snapshot, if not on ia32)
|
||||
# ........frontend_server.dart.snapshot
|
||||
# ........gen_kernel.dart.snapshot (if not on ia32)
|
||||
# ........kernel-service.dart.snapshot
|
||||
|
@ -394,7 +395,19 @@ group("copy_full_sdk_scripts") {
|
|||
}
|
||||
}
|
||||
|
||||
# This loop generates "copy" targets that put snapshots into bin/snapshots
|
||||
# This target puts the frontend_server AOT snapshot into bin/snapshots
|
||||
copy("copy_frontend_server_aot_snapshot") {
|
||||
visibility = [
|
||||
":copy_full_sdk_snapshots",
|
||||
":copy_platform_sdk_snapshots",
|
||||
]
|
||||
deps = [ "../utils/kernel-service:frontend_server_aot" ]
|
||||
sources = [ "$root_out_dir/frontend_server_aot.dart.snapshot" ]
|
||||
outputs = [ "$root_out_dir/$dart_sdk_output/bin/snapshots/frontend_server_aot.dart.snapshot" ]
|
||||
}
|
||||
|
||||
# This loop generates "copy" targets that put AppJIT snapshots into
|
||||
# bin/snapshots
|
||||
foreach(snapshot, _full_sdk_snapshots) {
|
||||
root = root_gen_dir
|
||||
|
||||
|
@ -423,6 +436,9 @@ group("copy_platform_sdk_snapshots") {
|
|||
foreach(snapshot, _platform_sdk_snapshots) {
|
||||
public_deps += [ ":copy_${snapshot[0]}_snapshot" ]
|
||||
}
|
||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||
public_deps += [ ":copy_frontend_server_aot_snapshot" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is the main rule for copying snapshots from _full_sdk_snapshots to
|
||||
|
@ -433,6 +449,9 @@ group("copy_full_sdk_snapshots") {
|
|||
foreach(snapshot, _full_sdk_snapshots) {
|
||||
public_deps += [ ":copy_${snapshot[0]}_snapshot" ]
|
||||
}
|
||||
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||
public_deps += [ ":copy_frontend_server_aot_snapshot" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is the main rule for copying the files that dartdoc needs.
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
import("../../build/dart/dart_action.gni")
|
||||
import("../../runtime/runtime_args.gni")
|
||||
import("../../sdk_args.gni")
|
||||
import("../aot_snapshot.gni")
|
||||
import("../application_snapshot.gni")
|
||||
import("../create_timestamp.gni")
|
||||
|
||||
|
@ -62,6 +63,12 @@ application_snapshot("frontend_server") {
|
|||
output = "$root_out_dir/frontend_server.dart.snapshot"
|
||||
}
|
||||
|
||||
aot_snapshot("frontend_server_aot") {
|
||||
main_dart = "../../pkg/frontend_server/bin/frontend_server_starter.dart"
|
||||
name = "frontend_server_aot"
|
||||
output = "$root_out_dir/frontend_server_aot.dart.snapshot"
|
||||
}
|
||||
|
||||
template("kernel_service_dill") {
|
||||
prebuilt_dart_action("kernel_service" + target_name + "_dill") {
|
||||
deps = [
|
||||
|
|
Loading…
Reference in a new issue