dart-sdk/runtime/vm/BUILD.gn

193 lines
5.8 KiB
Plaintext
Raw Normal View History

# Copyright (c) 2014, 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/executable_suffix.gni")
import("../../sdk/lib/async/async_sources.gni")
import("../../sdk/lib/collection/collection_sources.gni")
import("../../sdk/lib/convert/convert_sources.gni")
import("../../sdk/lib/core/core_sources.gni")
import("../../sdk/lib/developer/developer_sources.gni")
import("../../sdk/lib/ffi/ffi_sources.gni")
import("../../sdk/lib/internal/internal_sources.gni")
import("../../sdk/lib/isolate/isolate_sources.gni")
import("../../sdk/lib/math/math_sources.gni")
import("../../sdk/lib/mirrors/mirrors_sources.gni")
import("../../sdk/lib/typed_data/typed_data_sources.gni")
import("../../sdk/lib/vmservice/vmservice_sources.gni")
Reland "Scaffolding for dart:wasm" This reverts commit 9198813a553c6ce230c8c545d33fbad14ffef340. Reason for revert: Relanding with a fix Original change's description: > Revert "Scaffolding for dart:wasm" > > This reverts commit f39a3f188e3bd259d4d7e41c48516e507c1303f1. > > Reason for revert: https://golem.corp.goog/BuildInfo?target=flutter-profile&machine-type=android-armv7&revision=84750 > > Original change's description: > > Scaffolding for dart:wasm > > > > This CL doesn't have any tests because it's just boilerplate. I'll > > add a test in the follow up CLs where I add actual functionality. > > > > Bug: https://github.com/dart-lang/sdk/issues/37882 > > Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841 > > Reviewed-by: Siva Annamalai <asiva@google.com> > > Reviewed-by: Liam Appelbe <liama@google.com> > > Commit-Queue: Liam Appelbe <liama@google.com> > > TBR=asiva@google.com,liama@google.com > > Change-Id: I0fd0f29d66a07fc29e840ddaec2d4161c8d599cb > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: https://github.com/dart-lang/sdk/issues/37882 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114044 > Reviewed-by: Liam Appelbe <liama@google.com> > Commit-Queue: Liam Appelbe <liama@google.com> TBR=asiva@google.com,liama@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: https://github.com/dart-lang/sdk/issues/37882 Change-Id: Idb43cbd3a0521776ac420bfef91c8a9a4362f18e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114757 Reviewed-by: Liam Appelbe <liama@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-28 23:11:21 +00:00
import("../../sdk/lib/wasm/wasm_sources.gni")
import("../../utils/compile_platform.gni")
import("../bin/cli_sources.gni")
import("../bin/io_sources.gni")
import("../configs.gni")
import("../lib/async_sources.gni")
import("../lib/collection_sources.gni")
import("../lib/convert_sources.gni")
import("../lib/core_sources.gni")
import("../lib/developer_sources.gni")
import("../lib/ffi_sources.gni")
import("../lib/internal_sources.gni")
import("../lib/isolate_sources.gni")
import("../lib/math_sources.gni")
import("../lib/mirrors_sources.gni")
import("../lib/profiler_sources.gni")
import("../lib/typed_data_sources.gni")
import("../lib/vmservice_sources.gni")
Reland "Scaffolding for dart:wasm" This reverts commit 9198813a553c6ce230c8c545d33fbad14ffef340. Reason for revert: Relanding with a fix Original change's description: > Revert "Scaffolding for dart:wasm" > > This reverts commit f39a3f188e3bd259d4d7e41c48516e507c1303f1. > > Reason for revert: https://golem.corp.goog/BuildInfo?target=flutter-profile&machine-type=android-armv7&revision=84750 > > Original change's description: > > Scaffolding for dart:wasm > > > > This CL doesn't have any tests because it's just boilerplate. I'll > > add a test in the follow up CLs where I add actual functionality. > > > > Bug: https://github.com/dart-lang/sdk/issues/37882 > > Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841 > > Reviewed-by: Siva Annamalai <asiva@google.com> > > Reviewed-by: Liam Appelbe <liama@google.com> > > Commit-Queue: Liam Appelbe <liama@google.com> > > TBR=asiva@google.com,liama@google.com > > Change-Id: I0fd0f29d66a07fc29e840ddaec2d4161c8d599cb > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: https://github.com/dart-lang/sdk/issues/37882 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114044 > Reviewed-by: Liam Appelbe <liama@google.com> > Commit-Queue: Liam Appelbe <liama@google.com> TBR=asiva@google.com,liama@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: https://github.com/dart-lang/sdk/issues/37882 Change-Id: Idb43cbd3a0521776ac420bfef91c8a9a4362f18e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114757 Reviewed-by: Liam Appelbe <liama@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-28 23:11:21 +00:00
import("../lib/wasm_sources.gni")
import("../runtime_args.gni")
import("compiler/compiler_sources.gni")
import("heap/heap_sources.gni")
import("vm_sources.gni")
if (is_fuchsia) {
import("//build/fuchsia/sdk.gni")
}
config("libdart_vm_config") {
if (is_fuchsia) {
libs = [ "zircon" ]
} else if (is_win) {
libs = [
"advapi32.lib",
"shell32.lib",
"dbghelp.lib",
]
} else {
libs = [ "dl" ]
if (!is_android) {
libs += [ "pthread" ]
}
if (is_linux) {
libs += [ "rt" ]
}
}
}
library_for_all_configs("libdart_vm") {
target_type = "source_set"
Reland "[vm] Finish adding support for ECMAScript 2018 features." This work pulls in v8 support for these features with appropriate changes for Dart and closes https://github.com/dart-lang/sdk/issues/34935. This adds support for the following features: * Interpreting patterns as Unicode patterns instead of BMP patterns * the dotAll flag (`/s`) for changing the behavior of '.' to also match line terminators * Escapes for character classes described by Unicode property groups (e.g., \p{Greek} to match all Greek characters, or \P{Greek} for all non-Greek characters). The following TC39 proposals describe some of the added features: * https://github.com/tc39/proposal-regexp-dotall-flag * https://github.com/tc39/proposal-regexp-unicode-property-escapes These additional changes are included: * Extends named capture group names to include the full range of identifier characters supported by ECMAScript, not just ASCII. * Changing the RegExp interface to return RegExpMatch objects, not Match objects, so that downcasting is not necessary to use named capture groups from Dart **Note**: The changes to the RegExp interface are a breaking change for implementers of the RegExp interface. Current users of the RegExp interface (i.e., code using Dart RegExp objects) will not be affected. Change-Id: Ie62e6082a0e2fedc1680ef2576ce0c6db80fc19a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100641 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-29 09:11:48 +00:00
extra_deps = [ "//third_party/icu" ]
if (is_fuchsia) {
if (using_fuchsia_sdk) {
extra_deps += [
"$fuchsia_sdk_root/fidl:fuchsia.deprecatedtimezone",
"$fuchsia_sdk_root/pkg:sys_cpp",
"$fuchsia_sdk_root/pkg:trace-engine",
]
} else {
extra_deps += [
# TODO(US-399): Remove time_service specific code when it is no longer
# necessary.
"//sdk/lib/sys/cpp",
"//sdk/fidl/fuchsia.timezone",
"//zircon/public/lib/fbl",
"//zircon/public/lib/trace-engine",
]
}
}
public_configs = [ ":libdart_vm_config" ]
set_sources_assignment_filter([
"*_test.cc",
"*_test.h",
])
sources = vm_sources + rebase_path(compiler_sources, ".", "./compiler/") +
rebase_path(heap_sources, ".", "./heap/")
include_dirs = [ ".." ]
}
library_for_all_configs("libdart_lib") {
target_type = "source_set"
if (is_fuchsia) {
if (using_fuchsia_sdk) {
extra_deps = [ "$fuchsia_sdk_root/pkg:trace-engine" ]
} else {
extra_deps = [
"//zircon/public/lib/fbl",
"//zircon/public/lib/trace-engine",
]
}
}
if (dart_enable_wasm) {
defines = [ "DART_ENABLE_WASM" ]
}
include_dirs = [ ".." ]
allsources = async_runtime_cc_files + collection_runtime_cc_files +
core_runtime_cc_files + developer_runtime_cc_files +
internal_runtime_cc_files + isolate_runtime_cc_files +
math_runtime_cc_files + mirrors_runtime_cc_files +
typed_data_runtime_cc_files + vmservice_runtime_cc_files +
Reland "Scaffolding for dart:wasm" This reverts commit 9198813a553c6ce230c8c545d33fbad14ffef340. Reason for revert: Relanding with a fix Original change's description: > Revert "Scaffolding for dart:wasm" > > This reverts commit f39a3f188e3bd259d4d7e41c48516e507c1303f1. > > Reason for revert: https://golem.corp.goog/BuildInfo?target=flutter-profile&machine-type=android-armv7&revision=84750 > > Original change's description: > > Scaffolding for dart:wasm > > > > This CL doesn't have any tests because it's just boilerplate. I'll > > add a test in the follow up CLs where I add actual functionality. > > > > Bug: https://github.com/dart-lang/sdk/issues/37882 > > Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841 > > Reviewed-by: Siva Annamalai <asiva@google.com> > > Reviewed-by: Liam Appelbe <liama@google.com> > > Commit-Queue: Liam Appelbe <liama@google.com> > > TBR=asiva@google.com,liama@google.com > > Change-Id: I0fd0f29d66a07fc29e840ddaec2d4161c8d599cb > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: https://github.com/dart-lang/sdk/issues/37882 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114044 > Reviewed-by: Liam Appelbe <liama@google.com> > Commit-Queue: Liam Appelbe <liama@google.com> TBR=asiva@google.com,liama@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: https://github.com/dart-lang/sdk/issues/37882 Change-Id: Idb43cbd3a0521776ac420bfef91c8a9a4362f18e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114757 Reviewed-by: Liam Appelbe <liama@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-28 23:11:21 +00:00
ffi_runtime_cc_files + wasm_runtime_cc_files
sources = [ "bootstrap.cc" ] + rebase_path(allsources, ".", "../lib")
snapshot_sources = []
nosnapshot_sources = []
}
template("gen_vm_platform") {
assert(defined(invoker.output_postfix),
"Must define output postfix (e.g., '_strong'")
compile_platform(target_name) {
output_postfix = invoker.output_postfix
if (defined(invoker.add_implicit_vm_platform_dependency)) {
add_implicit_vm_platform_dependency =
invoker.add_implicit_vm_platform_dependency
}
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("../../")
libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
outputs = [
"$root_out_dir/vm_platform" + output_postfix + ".dill",
"$root_out_dir/vm_outline" + output_postfix + ".dill",
]
args = [ "dart:core" ]
is_product_flag = dart_runtime_mode == "release"
allow_causal_async_stacks = !is_product_flag
args += [
"-Ddart.vm.product=$is_product_flag",
"-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks",
"-Ddart.isVM=true",
]
if (defined(invoker.exclude_source) && invoker.exclude_source) {
args += [ "--exclude-source" ]
}
if (defined(invoker.bytecode) && invoker.bytecode) {
args += [ "--bytecode" ]
}
outline = "vm_outline" + output_postfix + ".dill"
}
}
gen_vm_platform("vm_platform") {
add_implicit_vm_platform_dependency = false
exclude_source = false
output_postfix = "_strong"
}
gen_vm_platform("vm_platform_stripped") {
add_implicit_vm_platform_dependency = false
exclude_source = true
output_postfix = "_strong_stripped"
if (dart_platform_bytecode) {
bytecode = true
}
}
group("kernel_platform_files") {
public_deps = [
":vm_platform",
":vm_platform_stripped",
]
}
Reland "[vm] Create offsets_extractor tool." This reverts commit 224f82c21cb2966f36ab850eae7ef5c8697cc477. Reason for revert: Just need to split DBC section into 32 and 64 bit Original change's description: > Revert "[vm] Create offsets_extractor tool." > > This reverts commit 3015d79371a1cf6407e5e799354d42fc6a0dcaec. > > Reason for revert: Fails the Flutter build > /b/s/w/ir/cache/builder/mac_sdk -mmacosx-version-min=10.12 -m32 -fno-strict-aliasing -fstack-protector-all -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wunguarded-availability -fvisibility=hidden -stdlib=libc++ -Wheader-hygiene -Wstring-conversion -Wthread-safety -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -O3 -fvisibility-inlines-hidden -std=c++14 -fno-rtti -fno-exceptions -c ../../third_party/dart/runtime/vm/dart.cc -o clang_x86/obj/third_party/dart/runtime/vm/libdart_vm_nosnapshot_with_precompiler.dart.o > In file included from ../../third_party/dart/runtime/vm/dart.cc:9: > ../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:958:50: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 576460752303423487 to -1 [-Werror,-Wconstant-conversion] > static constexpr dart::word Array_kMaxElements = 576460752303423487; > ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~ > ../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:965:51: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 2305843009213693951 to -1 [-Werror,-Wconstant-conversion] > static constexpr dart::word String_kMaxElements = 2305843009213693951; > ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~ > 2 errors generated. > > Change-Id: Iaf509c6ee7a2ce75664935519ac02a933a9eb2bf > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104402 > Reviewed-by: Siva Annamalai <asiva@google.com> > Commit-Queue: Siva Annamalai <asiva@google.com> > Auto-Submit: Siva Annamalai <asiva@google.com> TBR=asiva@google.com Change-Id: Ibf749ceee274b03cdffa6d7ed46fcbe75d1a1e94 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104620 Reviewed-by: Liam Appelbe <liama@google.com> Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
2019-06-03 22:14:16 +00:00
executable("offsets_extractor") {
configs += [
"..:dart_arch_config",
"..:dart_config",
":libdart_vm_config",
]
sources = [
"compiler/offsets_extractor.cc",
]
include_dirs = [ ".." ]
}