mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Delete devk build file
Change-Id: If5cd723815deb27684d79d7d129e0bdeaf809e9f Reviewed-on: https://dart-review.googlesource.com/28661 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Karl Klose <karlklose@google.com>
This commit is contained in:
parent
5072cba017
commit
2132089ec4
|
@ -1,313 +0,0 @@
|
|||
# Copyright (c) 2017, 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/prebuilt_dart_sdk.gni")
|
||||
import("../application_snapshot.gni")
|
||||
import("../create_timestamp.gni")
|
||||
|
||||
patched_sdk_dir = "$target_gen_dir/patched_sdk"
|
||||
sdk_summary = "$target_gen_dir/ddc_sdk.sum"
|
||||
dart_root = rebase_path("../..")
|
||||
|
||||
sdk_lib_files = exec_script("../../tools/list_dart_files.py",
|
||||
[
|
||||
"absolute",
|
||||
rebase_path("../../sdk/lib"),
|
||||
],
|
||||
"list lines")
|
||||
|
||||
compiler_files = exec_script("../../tools/list_dart_files.py",
|
||||
[
|
||||
"absolute",
|
||||
rebase_path("../../pkg/compiler"),
|
||||
],
|
||||
"list lines")
|
||||
|
||||
dev_compiler_files = exec_script("../../tools/list_dart_files.py",
|
||||
[
|
||||
"absolute",
|
||||
rebase_path("../../pkg/dev_compiler"),
|
||||
],
|
||||
"list lines")
|
||||
|
||||
template("dart2js_compile") {
|
||||
assert(defined(invoker.main), "Must specify the main file")
|
||||
main = invoker.main
|
||||
assert(defined(invoker.out), "Must specify the out file")
|
||||
out = invoker.out
|
||||
abs_main = rebase_path(main)
|
||||
abs_output = rebase_path(out)
|
||||
|
||||
compiled_action(target_name) {
|
||||
tool = "../../runtime/bin:dart"
|
||||
inputs = sdk_lib_files + compiler_files + dev_compiler_files
|
||||
outputs = [
|
||||
out,
|
||||
]
|
||||
|
||||
dot_packages = rebase_path("../../.packages")
|
||||
compiler = rebase_path("../../pkg/compiler/lib/src/dart2js.dart")
|
||||
|
||||
args = [
|
||||
"--packages=$dot_packages",
|
||||
compiler,
|
||||
"--packages=$dot_packages",
|
||||
"$abs_main",
|
||||
"-m",
|
||||
"-o$abs_output",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
dart2js_compile("dartdevk_web") {
|
||||
main = rebase_path("../../pkg/dev_compiler/web/main.dart")
|
||||
out = "$root_out_dir/dev_compiler/build/web/ddk_web_compiler.js"
|
||||
}
|
||||
|
||||
# Apply dev_compiler's patch files to create the Dart version of the dartdevk
|
||||
# SDK.
|
||||
action("dartdevk_patch_sdk") {
|
||||
# TODO(rnystrom): Unfork DDC's patch_sdk.dart script with the
|
||||
# tools/patch_sdk.dart and then change this to use generate_patch_sdk().
|
||||
deps = [
|
||||
":dartdevk_files_stamp",
|
||||
|
||||
# The patch script uses several packages, including analyzer, so consider
|
||||
# it dirty if any of those change.
|
||||
"../../pkg:pkg_files_stamp",
|
||||
]
|
||||
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
deps += [ "$dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
|
||||
}
|
||||
|
||||
script = "../../tools/patch_sdk.py"
|
||||
|
||||
# We list the `patch_sdk.dart` tool here because the [script] (which is
|
||||
# implicitly an input) will call it.
|
||||
inputs = [
|
||||
"../../pkg/dev_compiler/tool/patch_sdk.dart",
|
||||
]
|
||||
|
||||
# The main SDK library sources.
|
||||
inputs += sdk_lib_files
|
||||
|
||||
# dev_compiler's additional sources and patch files.
|
||||
inputs += exec_script("../../tools/list_dart_files.py",
|
||||
[
|
||||
"absolute",
|
||||
rebase_path("../../pkg/dev_compiler/tool/input_sdk"),
|
||||
],
|
||||
"list lines")
|
||||
|
||||
# Arbitrarily use the version file as a token file to check against to see if
|
||||
# the sources have changed.
|
||||
# TODO(rnystrom): List the outputs more precisely?
|
||||
outputs = [
|
||||
"$patched_sdk_dir/version",
|
||||
]
|
||||
|
||||
args = []
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
dart_out_dir = get_label_info(
|
||||
"$dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
||||
"root_out_dir")
|
||||
dart_bootstrap =
|
||||
rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
||||
args += [
|
||||
"--dart-executable",
|
||||
dart_bootstrap,
|
||||
]
|
||||
}
|
||||
|
||||
args += [
|
||||
"--script",
|
||||
rebase_path("../../pkg/dev_compiler/tool/patch_sdk.dart"),
|
||||
rebase_path("../../"),
|
||||
rebase_path("../../pkg/dev_compiler/tool/input_sdk"),
|
||||
rebase_path(patched_sdk_dir),
|
||||
]
|
||||
}
|
||||
|
||||
# Compiles the Dart core libraries and DDC runtime to an analyzer summary and
|
||||
# JS.
|
||||
action("dartdevk_sdk") {
|
||||
deps = [
|
||||
":dartdevk_files_stamp",
|
||||
":dartdevk_patch_sdk",
|
||||
"../../pkg:pkg_files_stamp",
|
||||
]
|
||||
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
deps += [ "$dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
|
||||
}
|
||||
|
||||
script = "../../tools/run_dart.py"
|
||||
|
||||
args = []
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
dart_out_dir = get_label_info(
|
||||
"$dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
||||
"root_out_dir")
|
||||
dart_bootstrap =
|
||||
rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
||||
args += [
|
||||
"--dart",
|
||||
dart_bootstrap,
|
||||
]
|
||||
}
|
||||
|
||||
args = [
|
||||
"--quiet",
|
||||
rebase_path("../../pkg/dev_compiler/tool/build_sdk.dart"),
|
||||
"--dart-sdk-summary=build",
|
||||
"--summary-out",
|
||||
rebase_path(sdk_summary),
|
||||
"--source-map",
|
||||
"--source-map-comment",
|
||||
"--inline-source-map",
|
||||
"--modules=amd",
|
||||
"-o",
|
||||
rebase_path("$target_gen_dir/js/amd/dart_sdk.js"),
|
||||
"--modules=es6",
|
||||
"-o",
|
||||
rebase_path("$target_gen_dir/js/es6/dart_sdk.js"),
|
||||
"--modules=common",
|
||||
"-o",
|
||||
rebase_path("$target_gen_dir/js/common/dart_sdk.js"),
|
||||
"--modules=legacy",
|
||||
"-o",
|
||||
rebase_path("$target_gen_dir/js/legacy/dart_sdk.js"),
|
||||
]
|
||||
|
||||
inputs = [
|
||||
"../../pkg/dev_compiler/tool/build_sdk.dart",
|
||||
|
||||
# Since the entire patched SDK is built in one step, if any file changes,
|
||||
# they all will. Instead of listing them all as outputs of
|
||||
# dartdevk_patch_sdk (which would require something like a depfile), just
|
||||
# use version as the token file whose timestamp we track.
|
||||
# TODO(rnystrom): Do something better?
|
||||
"$patched_sdk_dir/version",
|
||||
|
||||
# If dev_compiler itself changes, it can affect the generated SDK.
|
||||
"$target_gen_dir/dartdevk_files.stamp",
|
||||
|
||||
# Likewise, the packages dev_compiler depends on may affect its output.
|
||||
"$root_gen_dir/pkg_files.stamp",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
sdk_summary,
|
||||
"$target_gen_dir/js/amd/dart_sdk.js",
|
||||
"$target_gen_dir/js/amd/dart_sdk.js.map",
|
||||
"$target_gen_dir/js/common/dart_sdk.js",
|
||||
"$target_gen_dir/js/common/dart_sdk.js.map",
|
||||
"$target_gen_dir/js/es6/dart_sdk.js",
|
||||
"$target_gen_dir/js/es6/dart_sdk.js.map",
|
||||
"$target_gen_dir/js/legacy/dart_sdk.js",
|
||||
"$target_gen_dir/js/legacy/dart_sdk.js.map",
|
||||
]
|
||||
}
|
||||
|
||||
# Builds everything needed to run dartdevk and dartdevk tests using test.dart.
|
||||
group("dartdevk_test") {
|
||||
deps = [
|
||||
":dartdevk",
|
||||
":dartdevk_sdk",
|
||||
":dartdevk_sdk_kernel_summary",
|
||||
":dartdevk_test_pkg",
|
||||
"../../sdk:create_sdk",
|
||||
]
|
||||
}
|
||||
|
||||
create_timestamp_file("dartdevk_files_stamp") {
|
||||
path = rebase_path("../../pkg/dev_compiler/lib")
|
||||
output = "$target_gen_dir/dartdevk_files.stamp"
|
||||
}
|
||||
|
||||
# Compiles the packages used by the tests to JS with dartdevk so that they are
|
||||
# available for loading by the tests.
|
||||
compiled_action("dartdevk_test_pkg") {
|
||||
tool = "../../runtime/bin:dart"
|
||||
|
||||
deps = [
|
||||
":dartdevk_files_stamp",
|
||||
":dartdevk_sdk",
|
||||
":dartdevk_sdk_kernel_summary",
|
||||
"../../pkg:pkg_files_stamp",
|
||||
]
|
||||
|
||||
inputs = [
|
||||
"$target_gen_dir/ddc_sdk.dill",
|
||||
sdk_summary,
|
||||
"$target_gen_dir/dartdevk_files.stamp",
|
||||
"$root_gen_dir/pkg_files.stamp",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"$target_gen_dir/pkg/async_helper.dill",
|
||||
"$target_gen_dir/pkg/async_helper.js",
|
||||
"$target_gen_dir/pkg/async_helper.sum",
|
||||
"$target_gen_dir/pkg/collection.dill",
|
||||
"$target_gen_dir/pkg/collection.js",
|
||||
"$target_gen_dir/pkg/collection.sum",
|
||||
"$target_gen_dir/pkg/expect.dill",
|
||||
"$target_gen_dir/pkg/expect.js",
|
||||
"$target_gen_dir/pkg/expect.sum",
|
||||
"$target_gen_dir/pkg/js.dill",
|
||||
"$target_gen_dir/pkg/js.js",
|
||||
"$target_gen_dir/pkg/js.sum",
|
||||
"$target_gen_dir/pkg/matcher.dill",
|
||||
"$target_gen_dir/pkg/matcher.js",
|
||||
"$target_gen_dir/pkg/matcher.sum",
|
||||
"$target_gen_dir/pkg/meta.dill",
|
||||
"$target_gen_dir/pkg/meta.js",
|
||||
"$target_gen_dir/pkg/meta.sum",
|
||||
"$target_gen_dir/pkg/path.dill",
|
||||
"$target_gen_dir/pkg/path.js",
|
||||
"$target_gen_dir/pkg/path.sum",
|
||||
"$target_gen_dir/pkg/stack_trace.dill",
|
||||
"$target_gen_dir/pkg/stack_trace.js",
|
||||
"$target_gen_dir/pkg/stack_trace.sum",
|
||||
|
||||
# TODO(rnystrom): Remove this when unittest is no longer used. Also remove
|
||||
# any of the above packages that are only here because unittest uses them.
|
||||
"$target_gen_dir/pkg/unittest.dill",
|
||||
"$target_gen_dir/pkg/unittest.js",
|
||||
"$target_gen_dir/pkg/unittest.sum",
|
||||
]
|
||||
|
||||
args = [
|
||||
rebase_path("../../pkg/dev_compiler/tool/build_pkgs.dart"),
|
||||
"--analyzer-sdk",
|
||||
rebase_path(sdk_summary),
|
||||
"--kernel-sdk",
|
||||
rebase_path("$target_gen_dir/ddc_sdk.dill"),
|
||||
"--output",
|
||||
rebase_path("$target_gen_dir"),
|
||||
]
|
||||
}
|
||||
|
||||
# Compiles the DDC SDK's kernel summary.
|
||||
compiled_action("dartdevk_sdk_kernel_summary") {
|
||||
tool = "../../runtime/bin:dart"
|
||||
|
||||
deps = [
|
||||
":dartdevk_files_stamp",
|
||||
]
|
||||
|
||||
inputs = [
|
||||
"$target_gen_dir/dartdevk_files.stamp",
|
||||
]
|
||||
|
||||
outputs = [
|
||||
"$target_gen_dir/ddc_sdk.dill",
|
||||
]
|
||||
|
||||
args = [
|
||||
rebase_path("../../pkg/dev_compiler/tool/kernel_sdk.dart"),
|
||||
rebase_path("$target_gen_dir/ddc_sdk.dill"),
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue