mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
![asiva](/assets/img/avatar_default.png)
- make Dart2 the default option for the command line VM - add option --no-preview-dart-2 as a fallback option to run dart1 - change test scripts to use the executable dart for testing dart2 mode instead of pkg/vm/tool/dart2 - adjust numerous build and test configurations Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7 Reviewed-on: https://dart-review.googlesource.com/58240 Commit-Queue: Siva Annamalai <asiva@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> Reviewed-by: Vijay Menon <vsm@google.com>
56 lines
2 KiB
Plaintext
56 lines
2 KiB
Plaintext
# Copyright (c) 2018, 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.
|
|
|
|
import("../build/dart/dart_action.gni")
|
|
|
|
_dart_root = get_path_info("..", "abspath")
|
|
|
|
# Template to generate entry points JSON file using dart_bootstrap tool.
|
|
# List of entry points is generated as a by-product while doing precompilation.
|
|
#
|
|
# This template expects the following arguments:
|
|
# - input: Name of the input dart script for precompilation.
|
|
# - output: Name of the output entry points JSON file.
|
|
# - extra_args: Extra arguments to pass to dart_bootstrap (optional).
|
|
#
|
|
template("generate_entry_points_json_with_dart_bootstrap") {
|
|
assert(defined(invoker.input), "Must define input dart script")
|
|
assert(defined(invoker.output), "Must define output json file")
|
|
extra_args = []
|
|
if (defined(invoker.extra_args)) {
|
|
extra_args += invoker.extra_args
|
|
}
|
|
dart_bootstrap_action(target_name) {
|
|
# Printing precompiler entry points is folded into precompilation, so dart_bootstrap is invoked
|
|
# with correct arguments to generate app-aot snapshot.
|
|
script = invoker.input
|
|
output = invoker.output
|
|
outputs = [
|
|
output,
|
|
]
|
|
vm_args = [
|
|
"--no-preview-dart-2",
|
|
"--print-precompiler-entry-points=" + rebase_path(output),
|
|
"--snapshot=" + rebase_path("$target_gen_dir/dummy.snapshot"),
|
|
"--snapshot-kind=app-aot",
|
|
"--use-blobs",
|
|
"--snapshot-kind=app-aot",
|
|
] + extra_args
|
|
args = []
|
|
}
|
|
}
|
|
|
|
# Template to copy checked-in extra entry points JSON file.
|
|
#
|
|
# This template expects the following argument:
|
|
# - output: Target destination for the extra entry points JSON file.
|
|
#
|
|
template("copy_entry_points_extra_json") {
|
|
assert(defined(invoker.output), "Must define output json file")
|
|
copy(target_name) {
|
|
sources = [ "$_dart_root/pkg/vm/lib/transformations/type_flow/entry_points_extra.json" ]
|
|
outputs = [ invoker.output ]
|
|
}
|
|
}
|