dart-sdk/BUILD.gn

195 lines
4.4 KiB
Plaintext
Raw Normal View History

# 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.
import("build/config/gclient_args.gni")
import("sdk_args.gni")
targetting_fuchsia = target_os == "fuchsia"
# This target will be built if no target is specified when invoking ninja.
group("default") {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
deps = [ ":runtime" ]
if (defined(checkout_llvm) && checkout_llvm) {
deps += [ ":llvm_codegen" ]
}
}
group("most") {
import("runtime/runtime_args.gni")
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
deps = [
":create_sdk",
":dart2js",
":dartanalyzer",
":dartdevc",
":runtime",
":samples",
]
if (dart_target_arch != "arm") {
deps += [ ":analysis_server" ]
}
}
group("runtime") {
import("runtime/runtime_args.gni")
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
deps = [
"runtime/bin:dart",
"runtime/bin:entrypoints_verification_test_extension",
"runtime/bin:ffi_test_dynamic_library",
"runtime/bin:ffi_test_functions",
"runtime/bin:process_test",
"runtime/bin:run_vm_tests",
"runtime/bin:sample_extension",
"runtime/bin:test_extension",
"runtime/vm:kernel_platform_files($host_toolchain)",
"utils/kernel-service:kernel-service",
]
# TODO(bkonyi): this dep causes a segfault on Android XARM_X64 builds.
# See issue #41776.
if (dart_target_arch != "arm") {
Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"" This reverts commit bc4cb123a8468d5ae27749fae5382b9f91379428. Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619 Original change's description: > Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process" > > This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process. > > By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues: > > VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630) > Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978) > Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092) > > This reverts commit 3849b5061c489ab079598075a9c8caae907f97b0. > > Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706 > Reviewed-by: Siva Annamalai <asiva@google.com> TBR=bkonyi@google.com,asiva@google.com Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800 Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
deps += [ "utils/dartdev:dartdev" ]
}
}
group("runtime_kernel") {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
deps = [ ":runtime" ]
}
group("runtime_precompiled") {
deps = [
"runtime/bin:dart_precompiled_runtime",
"runtime/bin:process_test",
]
}
group("create_sdk") {
public_deps = [ "sdk:create_sdk" ]
}
group("create_platform_sdk") {
public_deps = [ "sdk:create_platform_sdk" ]
}
group("dart2js") {
deps = [ "utils/compiler:dart2js" ]
}
group("dartanalyzer") {
deps = [ "utils/dartanalyzer" ]
}
group("dartdevc") {
deps = [ "utils/dartdevc" ]
}
group("dartfmt") {
deps = [ "utils/dartfmt" ]
}
group("dartfix") {
deps = [ "utils/dartfix" ]
}
group("analysis_server") {
deps = [ "utils/analysis_server" ]
}
group("check_llvm") {
if (defined(checkout_llvm) && checkout_llvm) {
deps = [ "runtime/llvm_codegen/test" ]
}
}
group("llvm_codegen") {
if (defined(checkout_llvm) && checkout_llvm) {
deps = [
"runtime/llvm_codegen/bit",
"runtime/llvm_codegen/codegen",
]
}
}
# 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" ]
}
# 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.
group("observatory_archive") {
deps = [ "runtime/observatory:copy_observatory_archive" ]
}
group("compressed_observatory_archive") {
deps = [ "runtime/observatory:copy_compressed_observatory_archive" ]
}
if (is_fuchsia) {
import("third_party/fuchsia/sdk/linux/build/component.gni")
import("third_party/fuchsia/sdk/linux/build/package.gni")
fuchsia_component("dart_sdk_fuchsia_test_component") {
testonly = true
data_deps = [ "runtime/bin:dart" ]
manifest = "build/fuchsia/dart.cmx"
Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"" This reverts commit bc4cb123a8468d5ae27749fae5382b9f91379428. Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619 Original change's description: > Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process" > > This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process. > > By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues: > > VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630) > Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978) > Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092) > > This reverts commit 3849b5061c489ab079598075a9c8caae907f97b0. > > Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706 > Reviewed-by: Siva Annamalai <asiva@google.com> TBR=bkonyi@google.com,asiva@google.com Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800 Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
resource_files = [
".packages",
]
resource_dirs = [
"tests/standalone",
"pkg/async_helper",
"pkg/expect",
"pkg/meta",
"pkg/smith",
"third_party/pkg/args",
"third_party/pkg/async",
"third_party/pkg/collection",
"third_party/pkg/path",
"third_party/pkg/pool",
"third_party/pkg/stack_trace",
]
resources = []
foreach(file, resource_files) {
Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"" This reverts commit bc4cb123a8468d5ae27749fae5382b9f91379428. Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619 Original change's description: > Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process" > > This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process. > > By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues: > > VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630) > Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978) > Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092) > > This reverts commit 3849b5061c489ab079598075a9c8caae907f97b0. > > Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706 > Reviewed-by: Siva Annamalai <asiva@google.com> TBR=bkonyi@google.com,asiva@google.com Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800 Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
resources += [{
path = file
dest = "data/" + file
}]
}
Revert "Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process"" This reverts commit bc4cb123a8468d5ae27749fae5382b9f91379428. Reason for revert: breaks crossword simarm tests https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-simarm_x64/2619 Original change's description: > Reland "[ VM / DartDev ] Launch DartDev in an isolate within a single main Dart process" > > This CL changes how DartDev is run and how the run command handles executing a Dart program (will port additional commands in a separate CL). Rather than using DartDev to spawn a child process to run user code, the VM will instead launch a DartDev isolate after doing some VM options processing. DartDev will communicate information like exit codes and script/arg pairs with the VM via isolate ports. Once DartDev runs to completion and notifies the VM that a script should be run, the VM will move on to spawning another isolate with user code and continue executing in the same VM process. > > By moving DartDev into an isolate within the same process that user code will eventually run in we're able to resolve the following issues that arose due to signal handling and IPC issues: > > VM hangs when --enable-vm-service is supplied and there are compile time errors (https://github.com/dart-lang/sdk/issues/42630) > Dart daemon spinning in exit code handler / zombie Dart processes (https://github.com/dart-lang/sdk/issues/41978) > Signal handling in children of 'dartdev run' is problematic (https://github.com/dart-lang/sdk/issues/42092) > > This reverts commit 3849b5061c489ab079598075a9c8caae907f97b0. > > Change-Id: I4fd3ba33840771a9f284d733c4a25fac6cde64ca > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154706 > Reviewed-by: Siva Annamalai <asiva@google.com> TBR=bkonyi@google.com,asiva@google.com Change-Id: I649d94c668417f2edbfd7039fa5c876e10dc32fe No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154800 Reviewed-by: Alexander Aprelev <aam@google.com>
2020-07-17 04:37:48 +00:00
resources += exec_script(
"tools/fuchsia/find_resources.py", resource_dirs, "json")
}
fuchsia_package("dart_sdk_fuchsia_test_package") {
testonly = true
deps = [ ":dart_sdk_fuchsia_test_component" ]
}
}