mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
![Zachary Anderson](/assets/img/avatar_default.png)
This has a few advantages: - We can track dependencies more precisely - ninja can assemble things in parallel as they're ready rather than sequentially all at once. - It is easier to customize SDKs depending on target platform, e.g. Fuchsia. This CL also has a number of cleanups: - Defining is_fuchsia and is_fuchsia host so we don't always have to check - Piping through toolchain overrides in more places - Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows related #29558 R=whesse@google.com Review-Url: https://codereview.chromium.org/2848943003 .
204 lines
4.2 KiB
Plaintext
204 lines
4.2 KiB
Plaintext
# 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.
|
|
|
|
# This target will be built if no target is specified when invoking ninja.
|
|
group("default") {
|
|
if (is_fuchsia || is_fuchsia_host) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [
|
|
":runtime",
|
|
]
|
|
}
|
|
|
|
group("most") {
|
|
if (is_fuchsia || is_fuchsia_host) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [
|
|
":analysis_server",
|
|
":create_sdk",
|
|
":dart2js",
|
|
":dartanalyzer",
|
|
":dartdevc",
|
|
":runtime",
|
|
":samples",
|
|
]
|
|
}
|
|
|
|
group("runtime") {
|
|
if (is_fuchsia || is_fuchsia_host) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [
|
|
"runtime/bin:dart",
|
|
"runtime/bin:dart_bootstrap($host_toolchain)",
|
|
"runtime/bin:process_test",
|
|
"runtime/bin:run_vm_tests",
|
|
"runtime/bin:sample_extension",
|
|
"runtime/bin:test_extension",
|
|
"runtime/vm:patched_sdk",
|
|
]
|
|
}
|
|
|
|
group("runtime_kernel") {
|
|
if (is_fuchsia || is_fuchsia_host) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [
|
|
":runtime",
|
|
|
|
# TODO(rmacnak): Link this into 'dart'.
|
|
"utils/kernel-service:kernel-service",
|
|
]
|
|
}
|
|
|
|
group("runtime_precompiled") {
|
|
deps = [
|
|
"runtime/bin:dart_bootstrap($host_toolchain)",
|
|
"runtime/bin:dart_precompiled_runtime",
|
|
"runtime/bin:process_test",
|
|
"runtime/vm:patched_sdk",
|
|
]
|
|
}
|
|
|
|
group("create_sdk") {
|
|
deps = [
|
|
"sdk:create_sdk",
|
|
]
|
|
}
|
|
|
|
group("dart2js") {
|
|
deps = [
|
|
"utils/compiler:dart2js",
|
|
]
|
|
}
|
|
|
|
group("dartanalyzer") {
|
|
deps = [
|
|
"utils/dartanalyzer",
|
|
]
|
|
}
|
|
|
|
group("dartdevc") {
|
|
deps = [
|
|
"utils/dartdevc",
|
|
]
|
|
}
|
|
|
|
group("dartfmt") {
|
|
deps = [
|
|
"utils/dartfmt",
|
|
]
|
|
}
|
|
|
|
group("analysis_server") {
|
|
deps = [
|
|
"utils/analysis_server",
|
|
]
|
|
}
|
|
|
|
# This is the target that is built on the dart2js build bots.
|
|
# It must depend on anything that is required by the dart2js
|
|
# test suites.
|
|
group("dart2js_bot") {
|
|
deps = [
|
|
":create_sdk",
|
|
]
|
|
}
|
|
|
|
group("samples") {
|
|
deps = [
|
|
"runtime/bin:sample_extension",
|
|
]
|
|
}
|
|
|
|
# The rules below build a qemu Fuchsia OS image that includes the Dart tree
|
|
# under /system/test/dart. Building this image is gated by the GN argument
|
|
# 'dart_build_fuchsia_test_image' because building the image is slow.
|
|
if (is_fuchsia) {
|
|
declare_args() {
|
|
dart_build_fuchsia_test_image = false
|
|
}
|
|
|
|
action("generate_dart_test_manifest") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
"//packages/gn:mkbootfs",
|
|
]
|
|
|
|
output_prefix = "$target_gen_dir/dart_test_tree"
|
|
outputs = [
|
|
"$output_prefix.manifest",
|
|
]
|
|
|
|
mode = "release"
|
|
if (is_debug) {
|
|
mode = "debug"
|
|
}
|
|
|
|
mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
|
|
user_manifest = "$mkbootfs_gen/user.bootfs.manifest"
|
|
|
|
script = "tools/gen_fuchsia_test_manifest.py"
|
|
args = [
|
|
"-m",
|
|
mode,
|
|
"-u",
|
|
rebase_path(user_manifest),
|
|
"-o",
|
|
rebase_path(output_prefix),
|
|
]
|
|
}
|
|
|
|
action("generate_dart_test_image") {
|
|
testonly = true
|
|
deps = [
|
|
":generate_dart_test_manifest",
|
|
"runtime/bin:dart",
|
|
"runtime/bin:process_test",
|
|
"runtime/bin:run_vm_tests",
|
|
]
|
|
|
|
# Compute path to magenta bootdata.bin
|
|
if (current_cpu == "arm64") {
|
|
magenta_bootdata =
|
|
"//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin"
|
|
} else if (current_cpu == "x64") {
|
|
magenta_bootdata =
|
|
"//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin"
|
|
} else {
|
|
assert(false, "unable to determine path to magenta's bootdata.bin")
|
|
}
|
|
|
|
input = "$target_gen_dir/dart_test_tree.manifest"
|
|
inputs = [
|
|
magenta_bootdata,
|
|
input,
|
|
]
|
|
|
|
output = "$root_out_dir/dart_test_tree.bin"
|
|
outputs = [
|
|
output,
|
|
]
|
|
|
|
script = "//packages/gn/make_bootfs.py"
|
|
args = [
|
|
"--manifest",
|
|
rebase_path(input),
|
|
"--output-file",
|
|
rebase_path(output),
|
|
"--build-id-map",
|
|
rebase_path("$target_gen_dir/build_id_map"),
|
|
"--pre-binaries",
|
|
rebase_path(magenta_bootdata),
|
|
]
|
|
}
|
|
}
|