2016-09-23 14:47:36 +00:00
|
|
|
# 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.
|
|
|
|
|
2017-06-22 20:17:50 +00:00
|
|
|
import("build/dart_host_toolchain.gni")
|
|
|
|
|
2016-09-23 14:47:36 +00:00
|
|
|
# This target will be built if no target is specified when invoking ninja.
|
|
|
|
group("default") {
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia || is_fuchsia_host) {
|
2016-12-13 21:02:52 +00:00
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2016-09-23 14:47:36 +00:00
|
|
|
deps = [
|
|
|
|
":runtime",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
group("most") {
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia || is_fuchsia_host) {
|
2016-12-13 21:02:52 +00:00
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2016-09-29 20:23:00 +00:00
|
|
|
deps = [
|
|
|
|
":analysis_server",
|
|
|
|
":create_sdk",
|
|
|
|
":dart2js",
|
|
|
|
":dartanalyzer",
|
|
|
|
":dartdevc",
|
|
|
|
":runtime",
|
|
|
|
":samples",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-09-23 14:47:36 +00:00
|
|
|
group("runtime") {
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia || is_fuchsia_host) {
|
2016-12-13 21:02:52 +00:00
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2016-09-23 14:47:36 +00:00
|
|
|
deps = [
|
2016-09-29 20:23:00 +00:00
|
|
|
"runtime/bin:dart",
|
2017-06-22 20:17:50 +00:00
|
|
|
"runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
2016-09-29 20:23:00 +00:00
|
|
|
"runtime/bin:process_test",
|
2016-10-26 15:50:54 +00:00
|
|
|
"runtime/bin:run_vm_tests",
|
2016-09-29 20:23:00 +00:00
|
|
|
"runtime/bin:sample_extension",
|
2016-10-26 15:50:54 +00:00
|
|
|
"runtime/bin:test_extension",
|
2016-10-27 08:09:22 +00:00
|
|
|
"runtime/vm:patched_sdk",
|
2017-01-31 22:46:30 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("runtime_kernel") {
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia || is_fuchsia_host) {
|
2017-01-31 23:32:58 +00:00
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2017-01-31 22:46:30 +00:00
|
|
|
deps = [
|
|
|
|
":runtime",
|
2017-01-31 17:47:51 +00:00
|
|
|
|
2017-03-02 15:04:30 +00:00
|
|
|
# TODO(rmacnak): Link this into 'dart'.
|
2017-01-31 17:47:51 +00:00
|
|
|
"utils/kernel-service:kernel-service",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("runtime_precompiled") {
|
|
|
|
deps = [
|
2017-06-22 20:17:50 +00:00
|
|
|
"runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
2016-10-26 15:50:54 +00:00
|
|
|
"runtime/bin:dart_precompiled_runtime",
|
2017-01-10 00:58:09 +00:00
|
|
|
"runtime/bin:process_test",
|
2016-10-27 08:09:22 +00:00
|
|
|
"runtime/vm:patched_sdk",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-04-19 16:00:12 +00:00
|
|
|
group("create_sdk") {
|
2016-09-29 20:23:00 +00:00
|
|
|
deps = [
|
2017-04-19 16:00:12 +00:00
|
|
|
"sdk:create_sdk",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("dart2js") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"utils/compiler:dart2js",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("dartanalyzer") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"utils/dartanalyzer",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("dartdevc") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"utils/dartdevc",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("dartfmt") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"utils/dartfmt",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("analysis_server") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"utils/analysis_server",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
# 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 = [
|
2016-10-26 15:50:54 +00:00
|
|
|
":create_sdk",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("samples") {
|
|
|
|
deps = [
|
2016-10-26 15:50:54 +00:00
|
|
|
"runtime/bin:sample_extension",
|
2016-09-23 14:47:36 +00:00
|
|
|
]
|
|
|
|
}
|
2017-01-19 18:11:27 +00:00
|
|
|
|
2017-05-24 05:14:55 +00:00
|
|
|
# The rules below build a Fuchsia OS image that includes the Dart tree
|
|
|
|
# under /system/test/dart.
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia) {
|
|
|
|
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"
|
2017-01-19 18:11:27 +00:00
|
|
|
}
|
|
|
|
|
2017-05-21 06:30:06 +00:00
|
|
|
mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
|
2017-05-24 05:14:55 +00:00
|
|
|
system_manifest = "$mkbootfs_gen/system.bootfs.manifest"
|
2017-05-21 06:30:06 +00:00
|
|
|
|
|
|
|
script = "tools/gen_fuchsia_test_manifest.py"
|
|
|
|
args = [
|
|
|
|
"-m",
|
|
|
|
mode,
|
|
|
|
"-u",
|
2017-05-24 05:14:55 +00:00
|
|
|
rebase_path(system_manifest),
|
2017-05-21 06:30:06 +00:00
|
|
|
"-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",
|
|
|
|
]
|
|
|
|
|
2017-05-24 05:14:55 +00:00
|
|
|
mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
|
|
|
|
boot_manifest = "$mkbootfs_gen/boot.bootfs.manifest"
|
|
|
|
|
2017-09-15 14:54:18 +00:00
|
|
|
# Compute path to zircon bootdata.bin
|
2017-05-21 06:30:06 +00:00
|
|
|
if (current_cpu == "arm64") {
|
2017-09-15 14:54:18 +00:00
|
|
|
zircon_bootdata =
|
|
|
|
"//out/build-zircon/build-zircon-qemu-arm64/bootdata.bin"
|
2017-05-21 06:30:06 +00:00
|
|
|
} else if (current_cpu == "x64") {
|
2017-09-15 20:28:49 +00:00
|
|
|
zircon_bootdata = "//out/build-zircon/build-zircon-pc-x86-64/bootdata.bin"
|
2017-05-21 06:30:06 +00:00
|
|
|
} else {
|
2017-09-15 14:54:18 +00:00
|
|
|
assert(false, "unable to determine path to zircon's bootdata.bin")
|
2017-01-19 18:11:27 +00:00
|
|
|
}
|
2017-05-21 06:30:06 +00:00
|
|
|
|
2017-06-29 14:45:17 +00:00
|
|
|
packages_file = "$mkbootfs_gen/packages"
|
|
|
|
|
2017-05-21 06:30:06 +00:00
|
|
|
input = "$target_gen_dir/dart_test_tree.manifest"
|
|
|
|
inputs = [
|
2017-09-15 14:54:18 +00:00
|
|
|
zircon_bootdata,
|
2017-05-21 06:30:06 +00:00
|
|
|
input,
|
|
|
|
]
|
|
|
|
|
|
|
|
output = "$root_out_dir/dart_test_tree.bin"
|
|
|
|
outputs = [
|
|
|
|
output,
|
|
|
|
]
|
|
|
|
|
|
|
|
script = "//packages/gn/make_bootfs.py"
|
|
|
|
args = [
|
2017-05-24 05:14:55 +00:00
|
|
|
"--boot-manifest",
|
|
|
|
rebase_path(boot_manifest),
|
|
|
|
"--system-manifest",
|
2017-05-21 06:30:06 +00:00
|
|
|
rebase_path(input),
|
|
|
|
"--output-file",
|
|
|
|
rebase_path(output),
|
|
|
|
"--build-id-map",
|
|
|
|
rebase_path("$target_gen_dir/build_id_map"),
|
|
|
|
"--pre-binaries",
|
2017-09-15 14:54:18 +00:00
|
|
|
rebase_path(zircon_bootdata),
|
2017-05-21 06:30:06 +00:00
|
|
|
]
|
2017-06-29 14:45:17 +00:00
|
|
|
args += read_file(packages_file, "list lines")
|
2017-01-19 18:11:27 +00:00
|
|
|
}
|
|
|
|
}
|