dart-sdk/utils/compiler/BUILD.gn

142 lines
3.8 KiB
Plaintext
Raw Normal View History

# 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.
import("../../sdk_args.gni")
import("../../utils/compile_platform.gni")
Revert "Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."" This reverts commit 46f2603781be3fae545cdd9f9f2f1a07f0fde0f5. Reason for revert: Broke Flutter 3H: https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/8899 Original change's description: > Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM." > > This reverts commit d9489622befb638c040975163cf9b8eba2ff057b. > > Reason for revert: flutter/engine@04f567bdde40eafb58a3aa3efb20e77e36edb9c7 > > Original change's description: > > Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM." > > > > This reverts commit 74cff6c7df3e8f212c7f41a3a25631e007abc0f7 as it > > introduces a breakage of flutter build process. > > > > Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz." > > > > This reverts commit 351acd155d5ccfe22e3b69ce7fc2bcd83308bc5e as a > > collateral damage. > > > > Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063 > > Commit-Queue: Alexander Aprelev <aam@google.com> > > Reviewed-by: Ryan Macnak <rmacnak@google.com> > > TBR=aam@google.com,rmacnak@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: Ie27eb455eddd3e60b96eb65bb3dad888b369baf6 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117286 > Reviewed-by: Ryan Macnak <rmacnak@google.com> > Reviewed-by: Alexander Aprelev <aam@google.com> > Commit-Queue: Ryan Macnak <rmacnak@google.com> TBR=aam@google.com,rmacnak@google.com Change-Id: I519a7330efa3a84b8b0a19b5f8d5e476d6ca96cd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117541 Reviewed-by: Clement Skau <cskau@google.com> Commit-Queue: Clement Skau <cskau@google.com>
2019-09-17 09:05:33 +00:00
import("../application_snapshot.gni")
import("../create_timestamp.gni")
create_timestamp_file("dart2js_files_stamp") {
path = rebase_path("../../pkg/compiler/lib")
output = "$target_gen_dir/dart2js_files.stamp"
}
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"
}
prebuilt_dart_action("dart2js_create_snapshot_entry") {
deps = [
":dart2js_files_stamp",
":dartdoc_files_stamp",
":runtime_lib_files_stamp",
]
output_dir = rebase_path(target_gen_dir)
script = "create_snapshot_entry.dart"
inputs = [
"$target_gen_dir/dart2js_files.stamp",
"../../tools/make_version.py",
"../../tools/VERSION",
]
outputs = [ "$target_gen_dir/dart2js.dart" ]
packages = "../../.packages"
args = [ "--output_dir=$output_dir" ]
}
sdk_root = "../../sdk"
application_snapshot("dart2js") {
deps = [
":compile_dart2js_nnbd_strong_platform",
":compile_dart2js_platform",
":dart2js_create_snapshot_entry",
]
inputs = [
"$root_out_dir/dart2js_platform.dill",
"$root_out_dir/dart2js_outline.dill",
"$root_out_dir/dart2js_nnbd_strong_platform.dill",
"$root_out_dir/dart2js_nnbd_strong_outline.dill",
]
vm_args = []
main_dart = "$target_gen_dir/dart2js.dart"
training_args = [
"--packages=" + rebase_path("../../.packages"),
"--libraries-spec=" + rebase_path("$sdk_root/lib/libraries.json"),
# 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"),
]
}
compile_platform("compile_dart2js_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
outputs = [
"$root_out_dir/dart2js_platform.dill",
"$root_out_dir/dart2js_outline.dill",
]
args = [
"--target=dart2js",
"--no-defines",
"dart:core",
]
}
compile_platform("compile_dart2js_nnbd_strong_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
outputs = [
"$root_out_dir/dart2js_nnbd_strong_platform.dill",
"$root_out_dir/dart2js_nnbd_strong_outline.dill",
]
args = [
"--target=dart2js",
"--no-defines",
"dart:core",
"--nnbd-strong",
]
}
compile_platform("compile_dart2js_server_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
outputs = [
"$root_out_dir/dart2js_server_platform.dill",
"$root_out_dir/dart2js_server_outline.dill",
]
args = [
"--target=dart2js_server",
"--no-defines",
"dart:core",
]
}
compile_platform("compile_dart2js_server_nnbd_strong_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
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",
"--nnbd-strong",
]
}