2016-09-29 20:23:00 +00:00
|
|
|
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
2017-10-17 11:29:50 +00:00
|
|
|
import("../../utils/compile_platform.gni")
|
2016-09-29 20:23:00 +00:00
|
|
|
import("../create_timestamp.gni")
|
2016-11-10 19:16:24 +00:00
|
|
|
import("../application_snapshot.gni")
|
2016-09-29 20:23:00 +00:00
|
|
|
|
|
|
|
create_timestamp_file("dart2js_files_stamp") {
|
|
|
|
path = rebase_path("../../pkg/compiler/lib")
|
2016-12-13 21:02:52 +00:00
|
|
|
output = "$target_gen_dir/dart2js_files.stamp"
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
2016-10-05 14:50:40 +00:00
|
|
|
create_timestamp_file("runtime_lib_files_stamp") {
|
|
|
|
path = rebase_path("../../runtime/lib")
|
|
|
|
output = "$target_gen_dir/runtime_lib_files.stamp"
|
|
|
|
}
|
|
|
|
|
|
|
|
create_timestamp_file("dartdoc_files_stamp") {
|
|
|
|
path = rebase_path("../../sdk/lib/_internal/dartdoc")
|
|
|
|
output = "$target_gen_dir/dartdoc_files.stamp"
|
|
|
|
}
|
|
|
|
|
2018-05-03 21:07:13 +00:00
|
|
|
dart_action("dart2js_create_snapshot_entry") {
|
2016-09-29 20:23:00 +00:00
|
|
|
deps = [
|
|
|
|
":dart2js_files_stamp",
|
2016-10-05 14:50:40 +00:00
|
|
|
":dartdoc_files_stamp",
|
2016-10-26 15:50:54 +00:00
|
|
|
":runtime_lib_files_stamp",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
|
2018-06-21 22:09:13 +00:00
|
|
|
# dart_action() needs kernel service snapshot to run in Dart 2 mode.
|
|
|
|
# This can't be added as a dependency to dart_action() itself as it will
|
|
|
|
# create a circular dependency.
|
2018-08-21 20:28:06 +00:00
|
|
|
deps += [ "../../utils/kernel-service:kernel-service" ]
|
2018-06-21 22:09:13 +00:00
|
|
|
|
2016-12-13 21:02:52 +00:00
|
|
|
output_dir = rebase_path(target_gen_dir)
|
2016-10-22 00:40:21 +00:00
|
|
|
|
2018-05-03 21:07:13 +00:00
|
|
|
script = "create_snapshot_entry.dart"
|
|
|
|
|
2016-10-05 14:50:40 +00:00
|
|
|
inputs = [
|
2016-09-29 20:23:00 +00:00
|
|
|
"../../sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart",
|
2016-12-13 21:02:52 +00:00
|
|
|
"$target_gen_dir/dart2js_files.stamp",
|
2018-07-03 22:50:16 +00:00
|
|
|
"../../tools/make_version.py",
|
2016-09-29 20:23:00 +00:00
|
|
|
"../../tools/VERSION",
|
|
|
|
]
|
|
|
|
|
|
|
|
outputs = [
|
2018-03-15 12:10:23 +00:00
|
|
|
"$target_gen_dir/dart2js.dart",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
|
2018-05-03 21:07:13 +00:00
|
|
|
packages = "../../.packages"
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
args = [
|
|
|
|
"--output_dir=$output_dir",
|
|
|
|
"--dart2js_main=pkg/compiler/lib/src/dart2js.dart",
|
|
|
|
]
|
|
|
|
}
|
2016-10-22 00:40:21 +00:00
|
|
|
|
|
|
|
application_snapshot("dart2js") {
|
|
|
|
deps = [
|
2018-03-15 12:10:23 +00:00
|
|
|
":compile_dart2js_platform",
|
2018-01-17 00:35:34 +00:00
|
|
|
":dart2js_create_snapshot_entry",
|
2016-10-22 00:40:21 +00:00
|
|
|
]
|
2018-03-15 12:10:23 +00:00
|
|
|
inputs = [
|
|
|
|
"$root_out_dir/dart2js_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_outline.dill",
|
|
|
|
]
|
2018-05-30 17:21:49 +00:00
|
|
|
vm_args = []
|
2016-12-13 21:02:52 +00:00
|
|
|
main_dart = "$target_gen_dir/dart2js.dart"
|
2016-10-22 00:40:21 +00:00
|
|
|
training_args = [
|
2016-12-13 21:02:52 +00:00
|
|
|
"--packages=" + rebase_path("../../.packages"),
|
2018-11-09 22:40:28 +00:00
|
|
|
"--libraries-spec=" + rebase_path("../../sdk/lib/libraries.json"),
|
2016-12-13 21:02:52 +00:00
|
|
|
rebase_path("$target_gen_dir/dart2js.dart"),
|
2016-10-22 00:40:21 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-10-17 11:29:50 +00:00
|
|
|
compile_platform("compile_dart2js_platform") {
|
2018-06-13 22:14:14 +00:00
|
|
|
single_root_scheme = "org-dartlang-sdk"
|
2018-07-02 20:47:23 +00:00
|
|
|
single_root_base = rebase_path("../../")
|
2018-06-13 23:50:54 +00:00
|
|
|
libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
|
2017-10-06 15:34:37 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/dart2js_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_outline.dill",
|
|
|
|
]
|
|
|
|
|
2018-03-02 22:19:19 +00:00
|
|
|
args = [
|
|
|
|
"--target=dart2js",
|
|
|
|
"dart:core",
|
|
|
|
]
|
|
|
|
}
|
2018-03-23 00:40:55 +00:00
|
|
|
compile_platform("compile_dart2js_server_platform") {
|
2018-06-13 22:14:14 +00:00
|
|
|
single_root_scheme = "org-dartlang-sdk"
|
2018-07-02 20:47:23 +00:00
|
|
|
single_root_base = rebase_path("../../")
|
2018-06-13 23:50:54 +00:00
|
|
|
libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
|
2018-03-23 00:40:55 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/dart2js_server_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_server_outline.dill",
|
|
|
|
]
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--target=dart2js_server",
|
|
|
|
"dart:core",
|
|
|
|
]
|
|
|
|
}
|