mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
cd5d399e2b
This is a reland of commit0a393f1b69
The problem was that the checks for whether or not dartaotruntime existed were always returning false on Windows because the ".exe" suffix wasn't being taken into account. Patchset 2 addresses this. Original change's description: > [ DDS ] Fix DDS AOT snapshot build rules > > dds_aot.dart.snapshot was not being generated for runtime build targets, > and dds.dart.snapshot was being built regardless of whether or not we > were building for an IA32 target. > > This change also adds a check for IA32 in 'dart run' so the "Could not > find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message > isn't printed when we fall back to using dds.dart.snapshot. > > This change also reverts2cc08595a6
, which > failed to fix the issue it was attempting to fix. > > TEST=pkg/vm_service tests > > Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760 > Reviewed-by: Siva Annamalai <asiva@google.com> > Commit-Queue: Ben Konyi <bkonyi@google.com> TEST=pkg-win-release-try, pkg-win-release-arm64-try, and pkg/vm_service tests Change-Id: Ieab41edcb6bffca3be6bf628e357871f28949323 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342640 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Derek Xu <derekx@google.com>
238 lines
5.9 KiB
Text
238 lines
5.9 KiB
Text
# 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")
|
|
|
|
targeting_fuchsia = target_os == "fuchsia"
|
|
|
|
# This target will be built if no target is specified when invoking ninja.
|
|
group("default") {
|
|
if (targeting_fuchsia) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [ ":runtime" ]
|
|
}
|
|
|
|
group("most") {
|
|
import("runtime/runtime_args.gni")
|
|
if (targeting_fuchsia) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
deps = [
|
|
":analysis_server",
|
|
":create_sdk",
|
|
":dart2js",
|
|
":dartanalyzer",
|
|
":ddc",
|
|
":runtime",
|
|
]
|
|
}
|
|
|
|
group("runtime") {
|
|
import("runtime/runtime_args.gni")
|
|
|
|
if (targeting_fuchsia) {
|
|
# Fuchsia has run_vm_tests marked testonly.
|
|
testonly = true
|
|
}
|
|
|
|
deps = [
|
|
"runtime/bin:dart",
|
|
"runtime/bin:entrypoints_verification_test",
|
|
"runtime/bin:ffi_test_dynamic_library",
|
|
"runtime/bin:ffi_test_functions",
|
|
"runtime/bin:process_test",
|
|
"runtime/bin:run_vm_tests",
|
|
"runtime/vm:kernel_platform_files($host_toolchain)",
|
|
"samples/ffi/http:fake_http",
|
|
"utils/dartdev:dartdev",
|
|
"utils/kernel-service:kernel-service",
|
|
]
|
|
|
|
# This flag is set in runtime/runtime_args.gni
|
|
# The analyze_snapshot tool is only supported on 64 bit AOT builds running
|
|
# under linux and android platforms
|
|
if (build_analyze_snapshot) {
|
|
deps += [
|
|
# The `analyze_snapshot` tests require the `analyze_snapshot` as well as
|
|
# `gen_snapshot` binaries.
|
|
"runtime/bin:analyze_snapshot",
|
|
"runtime/bin:analyze_snapshot($host_toolchain)",
|
|
"runtime/bin:gen_snapshot",
|
|
"runtime/bin:gen_snapshot($host_toolchain)",
|
|
]
|
|
}
|
|
|
|
if (is_linux || is_android) {
|
|
deps += [ "runtime/bin:abstract_socket_test" ]
|
|
} else if (is_fuchsia) {
|
|
deps += [ ":fuchsia_test_package" ]
|
|
}
|
|
}
|
|
|
|
# A separate target and not included in group("runtime"). This way the target\
|
|
# "runtime" does not get many executables extra as build output.
|
|
group("run_ffi_unit_tests") {
|
|
deps = [ "runtime/bin/ffi_unit_test:run_ffi_unit_tests" ]
|
|
}
|
|
|
|
group("runtime_precompiled") {
|
|
deps = [
|
|
"runtime/bin:dart_precompiled_runtime",
|
|
"runtime/bin:process_test",
|
|
]
|
|
if (is_linux || is_android) {
|
|
deps += [ "runtime/bin:abstract_socket_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("dart2wasm_platform") {
|
|
deps = [
|
|
":runtime_precompiled",
|
|
"utils/dart2wasm:compile_dart2wasm_js_compatibility_platform",
|
|
"utils/dart2wasm:compile_dart2wasm_platform",
|
|
"utils/dart2wasm:dart2wasm_snapshot",
|
|
]
|
|
if (defined(is_product)) {
|
|
if (is_product) {
|
|
deps += [ "utils/dart2wasm:dart2wasm_product_snapshot" ]
|
|
} else {
|
|
deps += [ "utils/dart2wasm:dart2wasm_asserts_snapshot" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
group("dart2wasm") {
|
|
deps = [
|
|
":dart2wasm_platform",
|
|
"utils/dart2wasm:test_wasm_modules",
|
|
]
|
|
}
|
|
|
|
group("dart2wasm_benchmark") {
|
|
deps = [
|
|
":dart2wasm_platform",
|
|
"third_party/binaryen:wasm-opt",
|
|
]
|
|
}
|
|
|
|
group("dartanalyzer") {
|
|
deps = [ "utils/dartanalyzer" ]
|
|
}
|
|
|
|
group("ddc") {
|
|
deps = [ "utils/ddc:dartdevc" ]
|
|
}
|
|
|
|
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" ]
|
|
}
|
|
|
|
# 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/gn-sdk/src/component.gni")
|
|
import("third_party/fuchsia/gn-sdk/src/package.gni")
|
|
|
|
test_binaries = [
|
|
"dart",
|
|
"dart_precompiled_runtime",
|
|
"run_vm_tests",
|
|
]
|
|
|
|
foreach(binary, test_binaries) {
|
|
fuchsia_component("${binary}_test_component") {
|
|
testonly = true
|
|
manifest = "runtime/bin/${binary}_test_component.cml"
|
|
data_deps = [
|
|
"runtime/bin:${binary}",
|
|
"runtime/bin:ffi_test_dynamic_library",
|
|
"runtime/bin:ffi_test_functions",
|
|
]
|
|
library_files = [
|
|
"libffi_test_dynamic_library.so",
|
|
"libffi_test_functions.so",
|
|
]
|
|
resource_files = [
|
|
".dart_tool/package_config.json",
|
|
"pkg/testing/test/hello_test.dart",
|
|
"tools/addlatexhash.dart",
|
|
]
|
|
resource_dirs = [
|
|
"pkg/async_helper",
|
|
"pkg/expect",
|
|
"pkg/meta",
|
|
"tests/ffi",
|
|
"third_party/pkg/ffi",
|
|
"third_party/pkg/path",
|
|
]
|
|
resources = []
|
|
foreach(file, library_files) {
|
|
resources += [
|
|
{
|
|
path = root_out_dir + "/" + file
|
|
dest = "lib/" + file
|
|
},
|
|
]
|
|
}
|
|
foreach(file, resource_files) {
|
|
resources += [
|
|
{
|
|
path = file
|
|
dest = "data/" + file
|
|
},
|
|
]
|
|
}
|
|
resources +=
|
|
exec_script("tools/fuchsia/find_resources.py", resource_dirs, "json")
|
|
}
|
|
}
|
|
|
|
fuchsia_package("fuchsia_test_package") {
|
|
testonly = true
|
|
if (is_debug) {
|
|
package_name = "dart_test_debug"
|
|
} else if (is_release) {
|
|
package_name = "dart_test_release"
|
|
} else if (is_product) {
|
|
package_name = "dart_test_product"
|
|
}
|
|
deps = []
|
|
foreach(binary, test_binaries) {
|
|
deps += [ ":${binary}_test_component" ]
|
|
}
|
|
}
|
|
}
|