Cleanup some of the build rules to not use Dart 1 mode.
Change-Id: I799ae7e910b90047a76151e47fc4c46d20f46ff7 Reviewed-on: https://dart-review.googlesource.com/74493 Commit-Queue: Siva Annamalai <asiva@google.com> Reviewed-by: Zach Anderson <zra@google.com> Reviewed-by: Samir Jindel <sjindel@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
3463f94ed9
commit
a0776096b9
@@ -36,9 +36,6 @@ group("most") {
|
||||
group("runtime") {
|
||||
import("runtime/runtime_args.gni")
|
||||
|
||||
target_supports_aot = dart_target_arch == "arm" ||
|
||||
dart_target_arch == "arm64" || dart_target_arch == "x64"
|
||||
|
||||
if (targetting_fuchsia) {
|
||||
# Fuchsia has run_vm_tests marked testonly.
|
||||
testonly = true
|
||||
@@ -53,9 +50,6 @@ group("runtime") {
|
||||
"runtime/vm:kernel_platform_files($host_toolchain)",
|
||||
"utils/kernel-service:kernel-service",
|
||||
]
|
||||
if (target_supports_aot) {
|
||||
deps += [ "runtime/bin:precompiler_entry_points_json" ]
|
||||
}
|
||||
}
|
||||
|
||||
group("runtime_kernel") {
|
||||
|
||||
@@ -96,12 +96,6 @@ Future<int> compile(List<String> arguments) async {
|
||||
}
|
||||
|
||||
final List<String> entryPoints = options['entry-points'] ?? <String>[];
|
||||
if (entryPoints.isEmpty) {
|
||||
entryPoints.addAll([
|
||||
'pkg/vm/lib/transformations/type_flow/entry_points.json',
|
||||
'pkg/vm/lib/transformations/type_flow/entry_points_extra.json',
|
||||
]);
|
||||
}
|
||||
|
||||
final errorPrinter = new ErrorPrinter();
|
||||
final errorDetector = new ErrorDetector(previousErrorHandler: errorPrinter);
|
||||
|
||||
@@ -89,9 +89,6 @@ fi
|
||||
export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
|
||||
BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
|
||||
|
||||
ENTRY_POINTS="--entry-points ${BIN_DIR}/gen/runtime/bin/precompiler_entry_points.json \
|
||||
--entry-points ${SDK_DIR}/pkg/vm/lib/transformations/type_flow/entry_points_extra.json"
|
||||
|
||||
# Step 1: Generate Kernel binary from the input Dart source.
|
||||
"$BIN_DIR"/dart \
|
||||
"${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" \
|
||||
@@ -99,7 +96,6 @@ ENTRY_POINTS="--entry-points ${BIN_DIR}/gen/runtime/bin/precompiler_entry_points
|
||||
--aot \
|
||||
"${GEN_KERNEL_OPTIONS[@]}" \
|
||||
$PACKAGES \
|
||||
$ENTRY_POINTS \
|
||||
-o "$SNAPSHOT_FILE.dill" \
|
||||
"$SOURCE_FILE"
|
||||
|
||||
|
||||
+1
-10
@@ -6,7 +6,6 @@ import("../../build/dart/dart_action.gni")
|
||||
import("../../sdk/lib/_http/http_sources.gni")
|
||||
import("../../sdk/lib/io/io_sources.gni")
|
||||
import("../../sdk/lib/cli/cli_sources.gni")
|
||||
import("../../utils/generate_entry_points_json.gni")
|
||||
import("../runtime_args.gni")
|
||||
import("../vm/heap/heap_sources.gni")
|
||||
import("../vm/compiler/compiler_sources.gni")
|
||||
@@ -666,7 +665,7 @@ gen_snapshot_action("generate_snapshot_bin") {
|
||||
# dart 2.
|
||||
"--no-strong",
|
||||
"--no-sync-async",
|
||||
"--reify-generic-functions",
|
||||
"--no-reify-generic-functions",
|
||||
|
||||
"--snapshot_kind=" + dart_core_snapshot_kind,
|
||||
"--vm_snapshot_data=" + rebase_path(vm_snapshot_data, root_build_dir),
|
||||
@@ -1239,11 +1238,3 @@ shared_library("sample_extension") {
|
||||
ldflags = [ "/LIBPATH:$abs_root_out_dir" ]
|
||||
}
|
||||
}
|
||||
|
||||
generate_entry_points_json_with_dart_bootstrap(
|
||||
"precompiler_entry_points_json") {
|
||||
# Dart script to precompile (any valid script would suffice).
|
||||
input = "../tests/vm/dart/hello_world_test.dart"
|
||||
|
||||
output = "$target_gen_dir/precompiler_entry_points.json"
|
||||
}
|
||||
|
||||
@@ -242,7 +242,6 @@ EOF
|
||||
out/ReleaseX64/dart-sdk \
|
||||
out/ReleaseSIMDBC64/dart \
|
||||
out/ReleaseX64/gen/kernel-service.dart.snapshot \
|
||||
out/ReleaseX64/gen/runtime/bin/precompiler_entry_points.json \
|
||||
out/ReleaseX64/dart \
|
||||
out/ReleaseX64/dart_bootstrap \
|
||||
out/ReleaseX64/run_vm_tests \
|
||||
@@ -363,7 +362,6 @@ EOF
|
||||
out/ReleaseX64/dart-sdk \
|
||||
out/ReleaseSIMDBC64/dart \
|
||||
out/ReleaseX64/gen/kernel-service.dart.snapshot \
|
||||
out/ReleaseX64/gen/runtime/bin/precompiler_entry_points.json \
|
||||
out/ReleaseX64/dart \
|
||||
out/ReleaseX64/dart_bootstrap \
|
||||
out/ReleaseX64/run_vm_tests \
|
||||
|
||||
@@ -121,8 +121,7 @@ template("_application_snapshot") {
|
||||
# Arguments to pass to the Dart application for the training run.
|
||||
#
|
||||
# vm_args (optional):
|
||||
# Additional arguments to the Dart VM. Do not put --no-preview-dart-2 here.
|
||||
# Instead use the template application_snapshot_dart1.
|
||||
# Additional arguments to the Dart VM.
|
||||
#
|
||||
# name (optional):
|
||||
# The name of the snapshot if different from the target name. The output
|
||||
@@ -148,40 +147,6 @@ template("application_snapshot") {
|
||||
}
|
||||
}
|
||||
|
||||
# Creates an app-jit snapshot for a Dart1 program based on a training run.
|
||||
#
|
||||
# Parameters:
|
||||
# main_dart (required):
|
||||
# The entrypoint to the Dart application.
|
||||
#
|
||||
# training_args (required):
|
||||
# Arguments to pass to the Dart application for the training run.
|
||||
#
|
||||
# vm_args (optional):
|
||||
# Additional arguments to the Dart VM. Do not put --no-preview-dart-2 here.
|
||||
#
|
||||
# name (optional):
|
||||
# The name of the snapshot if different from the target name. The output
|
||||
# will be in $root_gen_dir/$name.dart.snapshot.
|
||||
#
|
||||
# deps (optional):
|
||||
# Any build dependencies.
|
||||
#
|
||||
# dot_packages (optional):
|
||||
# The .packages file for the app. Defaults to the $_dart_root/.packages.
|
||||
#
|
||||
# output (optional):
|
||||
# Overrides the full output path.
|
||||
template("application_snapshot_dart1") {
|
||||
_application_snapshot(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
if (!defined(invoker.vm_args)) {
|
||||
vm_args = []
|
||||
}
|
||||
vm_args += [ "--no-preview-dart-2" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Creates an app-jit snapshot for the common FE based on a training run.
|
||||
#
|
||||
# Parameters:
|
||||
@@ -192,7 +157,7 @@ template("application_snapshot_dart1") {
|
||||
# Arguments to pass to the Dart application for the training run.
|
||||
#
|
||||
# vm_args (optional):
|
||||
# Additional arguments to the Dart VM. Do not put --no-preview-dart-2 here.
|
||||
# Additional arguments to the Dart VM.
|
||||
#
|
||||
# name (optional):
|
||||
# The name of the snapshot if different from the target name. The output
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
# 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 ]
|
||||
}
|
||||
}
|
||||
@@ -78,15 +78,13 @@ prebuilt_dart_action("kernel_service_dill") {
|
||||
output,
|
||||
]
|
||||
|
||||
# Enable this when the prebuilt SDK rolls to pick up the fix for
|
||||
# Issue #34026.
|
||||
# depfile = "$target_gen_dir/kernel_service_dill.d"
|
||||
# abs_depfile = rebase_path(depfile)
|
||||
# abs_output = rebase_path(output)
|
||||
# vm_args = [
|
||||
# "--depfile=$abs_depfile",
|
||||
# "--depfile_output_filename=$abs_output",
|
||||
# ]
|
||||
depfile = "$root_gen_dir/kernel_service_dill.d"
|
||||
abs_depfile = rebase_path(depfile)
|
||||
abs_output = rebase_path(output)
|
||||
vm_args = [
|
||||
"--depfile=$abs_depfile",
|
||||
"--depfile_output_filename=$abs_output",
|
||||
]
|
||||
|
||||
script = gen_kernel_script
|
||||
|
||||
|
||||
Reference in New Issue
Block a user