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.
|
|
|
|
|
2019-07-30 20:34:31 +00:00
|
|
|
import("build/config/gclient_args.gni")
|
2019-10-09 23:24:21 +00:00
|
|
|
import("sdk_args.gni")
|
2017-11-02 19:02:18 +00:00
|
|
|
|
2018-01-18 06:05:56 +00:00
|
|
|
targetting_fuchsia = target_os == "fuchsia"
|
|
|
|
|
2016-09-23 14:47:36 +00:00
|
|
|
# This target will be built if no target is specified when invoking ninja.
|
|
|
|
group("default") {
|
2018-01-18 06:05:56 +00:00
|
|
|
if (targetting_fuchsia) {
|
2016-12-13 21:02:52 +00:00
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ ":runtime" ]
|
2019-08-09 19:00:24 +00:00
|
|
|
if (defined(checkout_llvm) && checkout_llvm) {
|
2019-09-27 21:14:11 +00:00
|
|
|
deps += [ ":llvm_codegen" ]
|
2019-07-30 20:34:31 +00:00
|
|
|
}
|
2016-09-23 14:47:36 +00:00
|
|
|
}
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
group("most") {
|
2019-07-31 12:54:52 +00:00
|
|
|
import("runtime/runtime_args.gni")
|
2018-01-18 06:05:56 +00:00
|
|
|
if (targetting_fuchsia) {
|
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 = [
|
|
|
|
":create_sdk",
|
|
|
|
":dart2js",
|
|
|
|
":dartanalyzer",
|
|
|
|
":dartdevc",
|
|
|
|
":runtime",
|
|
|
|
":samples",
|
|
|
|
]
|
2019-07-31 12:54:52 +00:00
|
|
|
if (dart_target_arch != "arm") {
|
|
|
|
deps += [ ":analysis_server" ]
|
|
|
|
}
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
2016-09-23 14:47:36 +00:00
|
|
|
group("runtime") {
|
2018-06-18 22:31:32 +00:00
|
|
|
import("runtime/runtime_args.gni")
|
|
|
|
|
2018-01-18 06:05:56 +00:00
|
|
|
if (targetting_fuchsia) {
|
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",
|
2019-09-27 21:14:11 +00:00
|
|
|
"runtime/bin:entrypoints_verification_test_extension",
|
|
|
|
"runtime/bin:ffi_test_dynamic_library",
|
|
|
|
"runtime/bin:ffi_test_functions",
|
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-11-01 21:13:28 +00:00
|
|
|
"runtime/vm:kernel_platform_files($host_toolchain)",
|
2017-01-31 17:47:51 +00:00
|
|
|
"utils/kernel-service:kernel-service",
|
2016-09-29 20:23:00 +00:00
|
|
|
]
|
2020-05-05 22:27:09 +00:00
|
|
|
|
|
|
|
# TODO(bkonyi): this dep causes a segfault on Android XARM_X64 builds.
|
|
|
|
# See issue #41776.
|
|
|
|
if (dart_target_arch != "arm") {
|
2020-07-21 16:23:18 +00:00
|
|
|
deps += [
|
|
|
|
"utils/dartdev:dartdev",
|
|
|
|
"utils/dds:dds",
|
|
|
|
]
|
2020-05-05 22:27:09 +00:00
|
|
|
}
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
2018-06-18 22:31:32 +00:00
|
|
|
group("runtime_kernel") {
|
2018-07-10 17:32:43 +00:00
|
|
|
if (targetting_fuchsia) {
|
|
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
|
|
testonly = true
|
|
|
|
}
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ ":runtime" ]
|
2018-06-18 22:31:32 +00:00
|
|
|
}
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
group("runtime_precompiled") {
|
|
|
|
deps = [
|
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
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2020-06-16 23:37:36 +00:00
|
|
|
group("create_sdk") {
|
|
|
|
public_deps = [ "sdk:create_sdk" ]
|
2019-09-25 00:43:13 +00:00
|
|
|
}
|
|
|
|
|
2020-06-16 23:37:36 +00:00
|
|
|
group("create_platform_sdk") {
|
|
|
|
public_deps = [ "sdk:create_platform_sdk" ]
|
2020-05-12 23:37:19 +00:00
|
|
|
}
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
group("dart2js") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/compiler:dart2js" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("dartanalyzer") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/dartanalyzer" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("dartdevc") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/dartdevc" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("dartfmt") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/dartfmt" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
2019-10-14 15:50:21 +00:00
|
|
|
group("dartfix") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/dartfix" ]
|
2019-10-14 15:50:21 +00:00
|
|
|
}
|
|
|
|
|
2016-09-29 20:23:00 +00:00
|
|
|
group("analysis_server") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "utils/analysis_server" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
2019-07-30 20:34:31 +00:00
|
|
|
group("check_llvm") {
|
2019-08-09 19:00:24 +00:00
|
|
|
if (defined(checkout_llvm) && checkout_llvm) {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "runtime/llvm_codegen/test" ]
|
2019-07-31 20:29:11 +00:00
|
|
|
}
|
2019-07-30 20:34:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("llvm_codegen") {
|
2019-08-09 19:00:24 +00:00
|
|
|
if (defined(checkout_llvm) && checkout_llvm) {
|
2019-07-31 20:29:11 +00:00
|
|
|
deps = [
|
|
|
|
"runtime/llvm_codegen/bit",
|
2019-09-27 21:14:11 +00:00
|
|
|
"runtime/llvm_codegen/codegen",
|
2019-07-31 20:29:11 +00:00
|
|
|
]
|
|
|
|
}
|
2019-07-30 20:34:31 +00:00
|
|
|
}
|
|
|
|
|
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") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ ":create_sdk" ]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("samples") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "runtime/bin:sample_extension" ]
|
2016-09-23 14:47:36 +00:00
|
|
|
}
|
2017-01-19 18:11:27 +00:00
|
|
|
|
2018-06-04 21:35:39 +00:00
|
|
|
# This rule and the compressed_observatory_archive rule are for the Fuchsia
|
|
|
|
# bots that pre-build the Observatory. They copy the observatory tar files to
|
|
|
|
# the root build output directory for convenient access by the Fuchsia buildbot
|
|
|
|
# scripts.
|
2018-05-29 16:35:34 +00:00
|
|
|
group("observatory_archive") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "runtime/observatory:copy_observatory_archive" ]
|
2018-06-04 21:35:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group("compressed_observatory_archive") {
|
2020-03-10 21:56:11 +00:00
|
|
|
deps = [ "runtime/observatory:copy_compressed_observatory_archive" ]
|
2018-05-29 16:35:34 +00:00
|
|
|
}
|
2020-07-10 18:10:05 +00:00
|
|
|
|
|
|
|
if (is_fuchsia) {
|
|
|
|
import("third_party/fuchsia/sdk/linux/build/component.gni")
|
|
|
|
import("third_party/fuchsia/sdk/linux/build/package.gni")
|
|
|
|
|
2020-07-21 19:40:15 +00:00
|
|
|
fuchsia_component("fuchsia_test_component") {
|
2020-07-10 18:10:05 +00:00
|
|
|
testonly = true
|
2020-07-15 20:44:06 +00:00
|
|
|
data_deps = [ "runtime/bin:dart" ]
|
|
|
|
manifest = "build/fuchsia/dart.cmx"
|
|
|
|
|
2020-07-21 19:40:15 +00:00
|
|
|
resource_files = [
|
2020-08-06 21:29:29 +00:00
|
|
|
".dart_tool/package_config.json",
|
2020-07-21 19:40:15 +00:00
|
|
|
"pkg/testing/test/hello_test.dart",
|
2020-08-06 21:29:29 +00:00
|
|
|
"tools/addlatexhash.dart",
|
2020-07-21 19:40:15 +00:00
|
|
|
]
|
2020-07-15 20:44:06 +00:00
|
|
|
resource_dirs = [
|
2020-08-06 21:29:29 +00:00
|
|
|
"tests/standalone_2",
|
2020-07-15 20:44:06 +00:00
|
|
|
"pkg/async_helper",
|
|
|
|
"pkg/expect",
|
|
|
|
"pkg/meta",
|
2020-08-06 21:29:29 +00:00
|
|
|
"pkg/native_stack_traces",
|
2020-07-15 20:44:06 +00:00
|
|
|
"pkg/smith",
|
|
|
|
"third_party/pkg/args",
|
|
|
|
"third_party/pkg/async",
|
2020-08-06 21:29:29 +00:00
|
|
|
"third_party/pkg/charcode",
|
2020-07-15 20:44:06 +00:00
|
|
|
"third_party/pkg/collection",
|
2020-08-06 21:29:29 +00:00
|
|
|
"third_party/pkg/convert",
|
|
|
|
"third_party/pkg/crypto",
|
|
|
|
"third_party/pkg/http",
|
|
|
|
"third_party/pkg/http_parser",
|
2020-07-15 20:44:06 +00:00
|
|
|
"third_party/pkg/path",
|
|
|
|
"third_party/pkg/pool",
|
|
|
|
"third_party/pkg/stack_trace",
|
2020-08-06 21:29:29 +00:00
|
|
|
"third_party/pkg/string_scanner",
|
|
|
|
"third_party/pkg/typed_data",
|
2020-07-10 18:10:05 +00:00
|
|
|
]
|
2020-07-15 20:44:06 +00:00
|
|
|
|
|
|
|
resources = []
|
|
|
|
foreach(file, resource_files) {
|
2020-07-21 16:23:18 +00:00
|
|
|
resources += [
|
|
|
|
{
|
|
|
|
path = file
|
|
|
|
dest = "data/" + file
|
|
|
|
},
|
|
|
|
]
|
2020-07-15 20:44:06 +00:00
|
|
|
}
|
2020-07-21 16:23:18 +00:00
|
|
|
resources +=
|
|
|
|
exec_script("tools/fuchsia/find_resources.py", resource_dirs, "json")
|
2020-07-10 18:10:05 +00:00
|
|
|
}
|
|
|
|
|
2020-07-21 19:40:15 +00:00
|
|
|
fuchsia_package("fuchsia_test_package") {
|
|
|
|
package_name = "dart_test_"
|
|
|
|
if (is_debug) {
|
|
|
|
package_name += "debug"
|
|
|
|
} else if (is_release) {
|
|
|
|
package_name += "release"
|
|
|
|
} else if (is_product) {
|
|
|
|
package_name += "product"
|
|
|
|
}
|
2020-07-10 18:10:05 +00:00
|
|
|
testonly = true
|
2020-07-21 19:40:15 +00:00
|
|
|
deps = [ ":fuchsia_test_component" ]
|
2020-07-10 18:10:05 +00:00
|
|
|
}
|
|
|
|
}
|