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.
|
|
|
|
|
2019-11-14 18:28:20 +00:00
|
|
|
import("../../sdk_args.gni")
|
2017-10-17 11:29:50 +00:00
|
|
|
import("../../utils/compile_platform.gni")
|
2019-09-17 09:05:33 +00:00
|
|
|
import("../application_snapshot.gni")
|
2019-09-18 02:53:44 +00:00
|
|
|
import("../create_timestamp.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"
|
|
|
|
}
|
|
|
|
|
2019-09-18 02:53:44 +00:00
|
|
|
prebuilt_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
|
|
|
]
|
|
|
|
|
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-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",
|
|
|
|
]
|
|
|
|
|
2020-03-10 21:56:11 +00:00
|
|
|
outputs = [ "$target_gen_dir/dart2js.dart" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
|
2018-05-03 21:07:13 +00:00
|
|
|
packages = "../../.packages"
|
|
|
|
|
2019-12-13 21:19:54 +00:00
|
|
|
args = [ "--output_dir=$output_dir" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
2016-10-22 00:40:21 +00:00
|
|
|
|
2020-06-16 23:37:36 +00:00
|
|
|
sdk_root = "../../sdk"
|
2019-11-14 18:28:20 +00:00
|
|
|
|
2016-10-22 00:40:21 +00:00
|
|
|
application_snapshot("dart2js") {
|
|
|
|
deps = [
|
2020-05-15 00:37:45 +00:00
|
|
|
":compile_dart2js_nnbd_strong_platform",
|
2020-05-28 00:31:13 +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",
|
2020-05-15 00:37:45 +00:00
|
|
|
"$root_out_dir/dart2js_nnbd_strong_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_nnbd_strong_outline.dill",
|
2018-03-15 12:10:23 +00:00
|
|
|
]
|
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"),
|
2020-05-28 00:31:13 +00:00
|
|
|
"--libraries-spec=" + rebase_path("$sdk_root/lib/libraries.json"),
|
2020-01-21 06:22:51 +00:00
|
|
|
|
2020-04-01 18:19:37 +00:00
|
|
|
# Specifying the platform explicitly elides running the CFE on the sdk
|
|
|
|
# sources.
|
|
|
|
"--platform-binaries=" + rebase_path("$root_out_dir/"),
|
|
|
|
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"
|
2020-05-28 00:31:13 +00:00
|
|
|
single_root_base = rebase_path("$sdk_root/")
|
|
|
|
libraries_specification_uri = "org-dartlang-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",
|
2020-03-31 16:57:40 +00:00
|
|
|
"--no-defines",
|
2018-03-02 22:19:19 +00:00
|
|
|
"dart:core",
|
|
|
|
]
|
|
|
|
}
|
2020-05-15 00:37:45 +00:00
|
|
|
compile_platform("compile_dart2js_nnbd_strong_platform") {
|
|
|
|
single_root_scheme = "org-dartlang-sdk"
|
2020-05-28 00:31:13 +00:00
|
|
|
single_root_base = rebase_path("$sdk_root/")
|
|
|
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
2020-05-15 00:37:45 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/dart2js_nnbd_strong_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_nnbd_strong_outline.dill",
|
|
|
|
]
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--target=dart2js",
|
|
|
|
"--no-defines",
|
|
|
|
"dart:core",
|
2020-06-16 23:37:36 +00:00
|
|
|
"--nnbd-strong",
|
2020-05-15 00:37:45 +00:00
|
|
|
]
|
|
|
|
}
|
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"
|
2020-05-28 00:31:13 +00:00
|
|
|
single_root_base = rebase_path("$sdk_root/")
|
|
|
|
libraries_specification_uri = "org-dartlang-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",
|
2020-03-31 16:57:40 +00:00
|
|
|
"--no-defines",
|
2018-03-23 00:40:55 +00:00
|
|
|
"dart:core",
|
|
|
|
]
|
|
|
|
}
|
2020-05-15 00:37:45 +00:00
|
|
|
compile_platform("compile_dart2js_server_nnbd_strong_platform") {
|
|
|
|
single_root_scheme = "org-dartlang-sdk"
|
2020-05-28 00:31:13 +00:00
|
|
|
single_root_base = rebase_path("$sdk_root/")
|
|
|
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
2020-05-15 00:37:45 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/dart2js_server_nnbd_strong_platform.dill",
|
|
|
|
"$root_out_dir/dart2js_server_nnbd_strong_outline.dill",
|
|
|
|
]
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--target=dart2js_server",
|
|
|
|
"--no-defines",
|
|
|
|
"dart:core",
|
2020-06-16 23:37:36 +00:00
|
|
|
"--nnbd-strong",
|
2020-05-15 00:37:45 +00:00
|
|
|
]
|
|
|
|
}
|