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-11-02 19:02:18 +00:00
|
|
|
import("build/dart_host_sdk_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-11-01 21:13:28 +00:00
|
|
|
"runtime/bin:dart_bootstrap($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",
|
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-11-01 21:13:28 +00:00
|
|
|
"runtime/vm:kernel_platform_files($host_toolchain)",
|
2017-01-31 17:47:51 +00:00
|
|
|
|
2017-03-02 15:04:30 +00:00
|
|
|
# TODO(rmacnak): Link this into 'dart'.
|
2018-01-12 20:40:41 +00:00
|
|
|
"utils/kernel-service:copy_kernel_service_snapshot",
|
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-11-01 21:13:28 +00:00
|
|
|
"runtime/bin:dart_bootstrap($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-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
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-11-06 19:06:18 +00:00
|
|
|
if (defined(dart_host_sdk_toolchain) &&
|
|
|
|
dart_host_sdk_toolchain != host_toolchain) {
|
2017-11-02 19:02:18 +00:00
|
|
|
group("create_host_sdk") {
|
|
|
|
deps = [
|
|
|
|
"sdk:create_sdk($dart_host_sdk_toolchain)",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
2017-10-24 15:27:58 +00:00
|
|
|
# under /system/test/dart. To get this into the `user.bootfs` generated
|
|
|
|
# by the Fuchsia build, add the GN build argument:
|
|
|
|
# extra_bootdata = [ "//third_party/dart:dart_test_bootfs" ]
|
2017-05-21 06:30:06 +00:00
|
|
|
if (is_fuchsia) {
|
2017-10-24 18:23:08 +00:00
|
|
|
import("//build/config/fuchsia/bootdata.gni")
|
2017-10-24 15:27:58 +00:00
|
|
|
|
2017-05-21 06:30:06 +00:00
|
|
|
action("generate_dart_test_manifest") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
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
|
|
|
script = "tools/gen_fuchsia_test_manifest.py"
|
|
|
|
args = [
|
|
|
|
"-m",
|
|
|
|
mode,
|
|
|
|
"-o",
|
|
|
|
rebase_path(output_prefix),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2017-10-24 15:27:58 +00:00
|
|
|
bootdata("dart_test_bootfs") {
|
2017-05-21 06:30:06 +00:00
|
|
|
testonly = true
|
|
|
|
deps = [
|
|
|
|
":generate_dart_test_manifest",
|
|
|
|
"runtime/bin:dart",
|
|
|
|
"runtime/bin:process_test",
|
|
|
|
"runtime/bin:run_vm_tests",
|
|
|
|
]
|
|
|
|
inputs = [
|
2017-10-24 15:27:58 +00:00
|
|
|
"$target_gen_dir/dart_test_tree.manifest",
|
2017-05-21 06:30:06 +00:00
|
|
|
]
|
2017-01-19 18:11:27 +00:00
|
|
|
}
|
|
|
|
}
|