1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 20:16:39 +00:00
dart-sdk/runtime/BUILD.gn

356 lines
9.4 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("../sdk_args.gni")
import("configs.gni")
import("runtime_args.gni")
import("//build/config/sysroot.gni")
config("dart_public_config") {
include_dirs = [
".",
"include",
]
}
# Adds PRODUCT define if Flutter has specified "release" for dart_runtime_mode
config("dart_maybe_product_config") {
defines = []
if (dart_runtime_mode != "develop" && dart_runtime_mode != "profile" &&
dart_runtime_mode != "release") {
print("Invalid |dart_runtime_mode|")
assert(false)
}
if (dart_runtime_mode == "release") {
if (dart_debug) {
print("Debug and release mode are mutually exclusive.")
}
assert(!dart_debug)
defines += [ "PRODUCT" ]
}
}
# This is a config to use to build PRODUCT mode artifacts in a RELEASE build.
# If a DEBUG build has been specified it will be ignored.
config("dart_product_config") {
defines = []
Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" The flutter engine DEPS got new icu/boringssl so this CL can safely land and roll into engine. A small change is made in Patchset 1..3. This removes special logic for creating the `dart-sdk` we distribute which used to build release and product mode and copied some binaries from the latter into the former, before the SDK was actuallly ready to test and distribute. This changes the GN build rules to build the necessary gen_snapshot/dart_precompiled_runtime product binaries during the normal release build. Normally during --mode=product builds the global build config in //build/config/BUILDCONFIG.gn will set `-fvisibility=false`. => Doing so results in much smaller binaries - because only explicitly exported symbols are visible, the rest can be tree shaken by the linker. Since we are building --mode=release, the `-fvisibility=false` will not be set. In order to set the flag for the 2 special product-mode binaries we need to add -fvisibility=hidden manually, in: * dart_product_config: Which is used for compiling VM sources. * 3rd party double-conversion library * 3rd party boringssl library * 3rd party icu library The upstream CLs are: * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482 * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407 Issue https://github.com/dart-lang/sdk/issues/42230 Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
cflags = []
if (!dart_debug) {
defines += [ "PRODUCT" ]
Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" The flutter engine DEPS got new icu/boringssl so this CL can safely land and roll into engine. A small change is made in Patchset 1..3. This removes special logic for creating the `dart-sdk` we distribute which used to build release and product mode and copied some binaries from the latter into the former, before the SDK was actuallly ready to test and distribute. This changes the GN build rules to build the necessary gen_snapshot/dart_precompiled_runtime product binaries during the normal release build. Normally during --mode=product builds the global build config in //build/config/BUILDCONFIG.gn will set `-fvisibility=false`. => Doing so results in much smaller binaries - because only explicitly exported symbols are visible, the rest can be tree shaken by the linker. Since we are building --mode=release, the `-fvisibility=false` will not be set. In order to set the flag for the 2 special product-mode binaries we need to add -fvisibility=hidden manually, in: * dart_product_config: Which is used for compiling VM sources. * 3rd party double-conversion library * 3rd party boringssl library * 3rd party icu library The upstream CLs are: * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482 * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407 Issue https://github.com/dart-lang/sdk/issues/42230 Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
if (is_posix) {
cflags = [
# This is the equivalent from `build/config/BUILDCONFIG.gn` which includes
# `build/config/gcc:symbol_visibility_hidden` in product mode.
"-fvisibility=hidden",
]
}
}
}
config("dart_precompiled_runtime_config") {
defines = []
defines += [
"DART_PRECOMPILED_RUNTIME",
"EXCLUDE_CFE_AND_KERNEL_PLATFORM",
]
}
config("add_empty_macho_section_config") {
if (is_mac) {
# We create an empty __space_for_note section in a __CUSTOM segment to
# reserve the header space needed for inserting a snapshot into the
# executable when creating standalone executables. This segment and section
# is removed in standalone executables, replaced with a note that points to
# the snapshot in the file.
#
# (A segment load command with a single section is 132 bytes in 32-bit
# executables and 152 bytes in 64-bit ones, and a note load command is
# always 40 bytes.)
#
# Keep this in sync with the constants reservedSegmentName and
# reservedSectionName in pkg/dart2native/lib/macho_utils.dart.
ldflags = [ "-Wl,-add_empty_section,__CUSTOM,__space_for_note" ]
}
}
# Controls DART_PRECOMPILER #define.
config("dart_precompiler_config") {
defines = []
defines += [ "DART_PRECOMPILER" ]
if (is_clang) {
cflags = [ "-fno-omit-frame-pointer" ]
}
# In our GN build rules we'll always compile AOT compiler & AOT runtime in
# the same mode (TSAN or non-TSAN).
if (is_tsan) {
defines += [ "TARGET_USES_THREAD_SANITIZER" ]
} else if (is_msan) {
defines += [ "TARGET_USES_MEMORY_SANITIZER" ]
}
}
config("dart_os_config") {
defines = []
if (target_os == "android") {
defines += [ "DART_TARGET_OS_ANDROID" ]
} else if (target_os == "fuchsia") {
defines += [ "DART_TARGET_OS_FUCHSIA" ]
} else if (target_os == "ios") {
defines += [ "DART_TARGET_OS_MACOS" ]
defines += [ "DART_TARGET_OS_MACOS_IOS" ]
} else if (target_os == "linux") {
defines += [ "DART_TARGET_OS_LINUX" ]
} else if (target_os == "mac") {
defines += [ "DART_TARGET_OS_MACOS" ]
} else if (target_os == "win") {
defines += [ "DART_TARGET_OS_WINDOWS" ]
} else if (target_os == "winuwp") {
defines += [
"DART_TARGET_OS_WINDOWS",
"DART_TARGET_OS_WINDOWS_UWP",
]
} else {
print("Unknown target_os: $target_os")
assert(false)
}
}
# We need to build gen_snapshot targeting Fuchsia during a build of the SDK
# targeting Mac and Linux. This configuration is used to unconditionally target
# Fuchsia. It should not be combined with dart_os_config.
config("dart_os_fuchsia_config") {
defines = [ "DART_TARGET_OS_FUCHSIA" ]
}
config("dart_arch_config") {
defines = []
if (dart_target_arch == "arm") {
defines += [ "TARGET_ARCH_ARM" ]
} else if (dart_target_arch == "arm64") {
defines += [ "TARGET_ARCH_ARM64" ]
} else if (dart_target_arch == "x64") {
defines += [ "TARGET_ARCH_X64" ]
} else if (dart_target_arch == "ia32" || dart_target_arch == "x86") {
defines += [ "TARGET_ARCH_IA32" ]
[vm] Support RISC-V. Implements a backend targeting RV32GC and RV64GC, based on Linux standardizing around GC. The assembler is written to make it easy to disable usage of C, but because the sizes of some instruction sequences are compile-time constants, an additional build configuration would need to be defined to make use of it. The assembler and disassembler cover every RV32/64GC instruction. The simulator covers all instructions except accessing CSRs and the floating point state accessible through such, include accrued exceptions and dynamic rounding mode. Quirks: - RISC-V is a compare-and-branch architecture, but some existing "architecture-independent" parts of the Dart compiler assume a condition code architecture. To avoid rewriting these parts, we use a peephole in the assembler to map to compare-and-branch. See Assembler::BranchIf. Luckily nothing depended on taking multiple branches on the same condition code set. - There are no hardware overflow checks, so we must use Hacker's Delight style software checks. Often these are very cheap: if the sign of one operand is known, a single branch is needed. - The ranges of RISC-V branches and jumps are such that we use 3 levels of generation for forward branches, instead of the 2 levels of near and far branches used on ARM[64]. Nearly all code is handled by the first two levels with 20-bits of range, with enormous regex matchers triggering the third level that uses aupic+jalr to get 32-bits of range. - For PC-relative calls in AOT, we always generate auipc+jalr pairs with 32-bits of range, so we never generate trampolines. - Only a subset of registers are available in some compressed instructions, so we assign the most popular uses to these registers. In particular, THR, TMP[2], CODE and PP. This has the effect of assigning CODE and PP to volatile registers in the C calling convention, whereas they are assigned preserved registers on the other architectures. As on ARM64, PP is untagged; this is so short indices can be accessed with a compressed instruction. - There are no push or pop instructions, so combining pushes and pops is preferred so we can update SP once. - The C calling convention has a strongly aligned stack, but unlike on ARM64 we don't need to use an alternate stack pointer. The author ensured language was added to the RISC-V psABI making the OS responsible for realigning the stack pointer for signal handlers, allowing Dart to leave the stack pointer misaligned from the C calling convention's point of view until a foreign call. - We don't bother with the link register tracking done on ARM[64]. Instead we make use of an alternate link register to avoid inline spilling in the write barrier. Unimplemented: - non-trivial FFI cases - Compressed pointers - No intention to implement. - Unboxed SIMD - We might make use of the V extension registers when the V extension is ratified. - BigInt intrinsics TEST=existing tests for IL level, new tests for assembler/disassembler/simulator Bug: https://github.com/dart-lang/sdk/issues/38587 Bug: https://github.com/dart-lang/sdk/issues/48164 Change-Id: I991d1df4be5bf55efec5371b767b332d37dfa3e0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217289 Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com> Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-20 00:57:57 +00:00
} else if (dart_target_arch == "riscv32") {
defines += [ "TARGET_ARCH_RISCV32" ]
} else if (dart_target_arch == "riscv64") {
defines += [ "TARGET_ARCH_RISCV64" ]
} else {
print("Invalid dart_target_arch: $dart_target_arch")
assert(false)
}
}
config("dart_config") {
defines = []
if (dart_debug) {
defines += [ "DEBUG" ]
} else {
defines += [ "NDEBUG" ]
}
include_dirs = [ "include" ]
if (dart_include_sampling_heap_profiler) {
defines += [ "FORCE_FORCE_INCLUDE_SAMPLING_HEAP_PROFILER" ]
}
if (dart_use_compressed_pointers) {
defines += [ "DART_COMPRESSED_POINTERS" ]
}
if (dart_support_perfetto) {
defines += [ "SUPPORT_PERFETTO" ]
}
if (is_fuchsia) {
Reland "[Fuchsia] Remove the legacy gn build rules for fuchsia" This change may require a codereview from flutter side before moving forward. See https://github.com/flutter/engine/pull/51072. This reverts commit 283051acba091ca172d089cecf6bbe401030014e. Reason for revert: Redo the change with the similar one in flutter. After this change, the next dart -> flutter roll needs extra cares in https://github.com/flutter/engine/pull/51072. It also contains more details about the reason why it could not be two-way compatible. Original change's description: > Revert "[Fuchsia] Remove the legacy gn build rules for fuchsia" > > This reverts commit 094202bb91f881e7a4a3b44246842dfed9370fce. > > Reason for revert: Break flutter, this change should happen after > flutter being migrated to the same gn-sdk. > > Original change's description: > > [Fuchsia] Remove the legacy gn build rules for fuchsia > > > > The updated test-scripts contains https://crrev.com/c/5341620 which > > allows to generate fidl apis with an env var controlled location > > rather than a hard-coded one. So the existing fuchsia gn build rules > > in dart/sdk become obsolete and can be fully removed in favor of the > > one in //third_party/fuchsia/gn-sdk/. > > > > Meanwhile the gn-sdk has been updated with > > https://crrev.com/c/5325282 to use api-level version'ed idk but not > > the ones in arch/. > > > > Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try > > Tested: ^^^^^ > > Bug: 40935282 > > Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283 > > Reviewed-by: Ryan Macnak <rmacnak@google.com> > > Reviewed-by: Alexander Thomas <athom@google.com> > > Commit-Queue: Zijie He <zijiehe@google.com> > > Bug: 40935282 > Change-Id: I7c455d1d362210523671c97d99ef018ede1743f4 > Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356307 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Auto-Submit: Zijie He <zijiehe@google.com> > Reviewed-by: Derek Xu <derekx@google.com> > Commit-Queue: Zijie He <zijiehe@google.com> Bug: 40935282 Change-Id: Id5a9a98013350359037b19f8506f24158c9a3120 Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356924 Commit-Queue: Zijie He <zijiehe@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-03-14 20:22:12 +00:00
lib_dirs = [ "${fuchsia_arch_root}/lib" ]
# TODO(chinmaygarde): Currently these targets need to be build in the
# Fuchsia tree as well as outside it using the SDK. However, not all
# Fuchsia features are available in the SDK. As these features are added,
# the guards can be removed. Eventually, only SDK builds will be present.
# Then, this flag can be removed completely.
defines += [ "FUCHSIA_SDK" ]
}
# Below are flags copied from ../build/config/compiler/BUILD.gn that should
# be preserved even when the Dart VM and runtime are compiled out-of-tree,
# for example in the Flutter Engine build. They ensure that the Dart VM
# and runtime are compiled with optimizations unless explicitly requested
# otherwise with the `dart_debug` and `dart_debug_optimization_level`
# flags.
if (is_win) {
if (dart_debug) {
if (is_clang && dart_debug_optimization_level != "2") {
cflags = [
"-d${dart_debug_optimization_level}",
"/Oy-",
]
} else {
cflags = [
"/O${dart_debug_optimization_level}",
"/Oy-",
]
}
} else {
cflags = [
"/O${dart_default_optimization_level}",
"/Ob2",
"/Oy-",
"/Oi",
"/Gw",
]
}
} else {
cflags = [
"-Wno-unused-parameter",
"-Wno-unused-private-field",
"-Wnon-virtual-dtor",
"-Wvla",
"-Woverloaded-virtual",
"-Wno-comments", # Conflicts with clang-format.
"-g3",
"-ggdb3",
"-fno-rtti",
"-fno-exceptions",
]
if (is_clang) {
cflags += [
"-Wimplicit-fallthrough",
"-fno-strict-vtable-pointers", # Handle assignment updates vtable
# pointers.
]
} else {
cflags += [
"-Wno-cast-function-type",
"-Wno-dangling-reference",
]
}
ldflags = []
if (is_clang && dart_vm_code_coverage) {
cflags += [
"-O0",
"-fprofile-arcs",
"-ftest-coverage",
]
ldflags += [ "--coverage" ]
} else if (dart_debug) {
cflags += [ "-O${dart_debug_optimization_level}" ]
} else {
cflags += [ "-O${dart_default_optimization_level}" ]
}
if (is_fuchsia) {
# safe-stack does not work with the interpreter.
cflags += [
"-fno-sanitize=safe-stack",
"-Wno-deprecated-copy",
]
}
}
}
config("dart_testing_config") {
defines = [ "TESTING" ]
}
config("dart_shared_lib") {
if (dart_lib_export_symbols) {
defines = [ "DART_SHARED_LIB" ]
}
}
config("dart_libfuzzer_config") {
defines = [ "FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" ]
cflags = [ "-fsanitize=address,fuzzer-no-link" ]
ldflags = [ "-fsanitize=address,fuzzer" ]
}
source_set("dart_api") {
public_configs = [ ":dart_public_config" ]
sources = [
Fixes for reland for analyze_snapshot program 1. Disable copying of executable for SDK binary signing 2. Fixes for ASAN memory leak in executable TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart This is a reland of 5d7d8a377dec742bd388849d139dbabdf9bee767 Original change's description: > Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"" > > This is a reland of 8d1eedca64d29e0e25d4536e4b145bf584c83eed > > Disable builds for Fuchsia > > TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart > Original change's description: > > Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection" > > > > This is a reland of 19e57493088ac57c1f3f45918b9dc97d15de42e0 > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > Original change's description: > > > [vm] Add analyze_snapshot tool for AOT snapshot inspection > > > > > > Current skeleton to allow for instrumentation snapshots that can be > > > built alongside Dart compilation artifacts and easily referenced for > > > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine > > > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > > > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68 > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087 > > > Reviewed-by: Slava Egorov <vegorov@google.com> > > > Commit-Queue: Slava Egorov <vegorov@google.com> > > > > Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526 > > Reviewed-by: Slava Egorov <vegorov@google.com> > > Commit-Queue: Slava Egorov <vegorov@google.com> > > Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890 > Reviewed-by: Slava Egorov <vegorov@google.com> > Commit-Queue: Chris Evans <cmevans@google.com> Change-Id: I1e6e57dda56f1710cc3a52e35d4067910930a701 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234500 Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Chris Evans <cmevans@google.com> Commit-Queue: Chris Evans <cmevans@google.com>
2022-03-09 14:17:44 +00:00
"include/analyze_snapshot_api.h",
"include/dart_api.h",
"include/dart_api_dl.c",
[vm/ffi] Expose a subset of dart_(native_)api.h for dynamic linking. This CL introduces dart_api_dl.h which exposes a subset of dart_api.h and dart_native_api.h for dynamic linking at runtime through the FFI. Dynamic linking is done through including dart_api_dl.cc in a shared library and passing NativeApi.initializeApiDLData to the init function. This CL also includes Native API versioning to deal with possible version skew between native api version against which native libraries are compiled and the version in the DartVM the code is run on. The subset of symbols in the CL includes handle related symbols, error related symbols, handle scope symbols, and native port sumbols. Design: http://go/dart-ffi-expose-dart-api Closes: https://github.com/dart-lang/sdk/issues/40607 Closes: https://github.com/dart-lang/sdk/issues/36858 Closes: https://github.com/dart-lang/sdk/issues/41319 Closes: https://github.com/flutter/flutter/issues/46887 Closes: https://github.com/flutter/flutter/issues/47061 Misc: Closes: https://github.com/dart-lang/sdk/issues/42260 Change-Id: I9e557808dbc99b341f23964cbddbb05f26d7a6c5 Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145592 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-18 07:30:43 +00:00
"include/dart_api_dl.h",
"include/dart_native_api.h",
"include/dart_tools_api.h",
[vm/ffi] Expose a subset of dart_(native_)api.h for dynamic linking. This CL introduces dart_api_dl.h which exposes a subset of dart_api.h and dart_native_api.h for dynamic linking at runtime through the FFI. Dynamic linking is done through including dart_api_dl.cc in a shared library and passing NativeApi.initializeApiDLData to the init function. This CL also includes Native API versioning to deal with possible version skew between native api version against which native libraries are compiled and the version in the DartVM the code is run on. The subset of symbols in the CL includes handle related symbols, error related symbols, handle scope symbols, and native port sumbols. Design: http://go/dart-ffi-expose-dart-api Closes: https://github.com/dart-lang/sdk/issues/40607 Closes: https://github.com/dart-lang/sdk/issues/36858 Closes: https://github.com/dart-lang/sdk/issues/41319 Closes: https://github.com/flutter/flutter/issues/46887 Closes: https://github.com/flutter/flutter/issues/47061 Misc: Closes: https://github.com/dart-lang/sdk/issues/42260 Change-Id: I9e557808dbc99b341f23964cbddbb05f26d7a6c5 Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145592 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-18 07:30:43 +00:00
"include/dart_version.h",
"include/internal/dart_api_dl_impl.h",
]
}
library_for_all_configs("libdart") {
target_type = dart_component_kind
Reland "Reland "[VM] Begin supporting Perfetto file recorder"" This is a reland of commit 4cd9c9c66663562d93261224eaaaa728e2a6a421 This will be relanded without changes because we discussed the .proto definition package name clashing problem with the Dart in google3 team, and we have decided that the best solution is to ignore the checked in .proto files in google3 builds. TEST=Recorded traces with the Perfetto file recorder and explored them in Perfetto's trace viewer, CI Original change's description: > Reland "[VM] Begin supporting Perfetto file recorder" > > This is a reland of commit 7424295ce95366a22321f4ec25040972ef17a728 > > The differences between this reland and the original CL are: now the > Perfetto file recorder does not get built in PRODUCT builds, and it does > not get built unless the SUPPORT_PERFETTO macro is defined. > > TEST=Recorded traces with the Perfetto file recorder and explored them > in Perfetto's trace viewer, CI > > Original change's description: > > [VM] Begin supporting Perfetto file recorder > > > > This CL adds the `TimelineEventPerfettoFileRecorder` class, which is a > > timeline recorder that writes a trace to file in Perfetto's proto > > format. This CL supports the recording of all types of timeline events > > except flow events. Support for flow events will be added in a future > > CL. > > > > TEST=Recorded traces with the Perfetto file recorder and explored them > > in Perfetto's trace viewer, CI > > > > Change-Id: Iaa2051e536589a473c5e15f9de9bb9c251f13d38 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278942 > > Reviewed-by: Ben Konyi <bkonyi@google.com> > > Commit-Queue: Derek Xu <derekx@google.com> > > Change-Id: I8713f704b5fbeed5f1231012bce8a32aaf566ae4 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286020 > Reviewed-by: Ben Konyi <bkonyi@google.com> > Commit-Queue: Derek Xu <derekx@google.com> Change-Id: Ia97ef1f0fe73e76c7022623b9ae7e21a4ea73a46 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295804 Commit-Queue: Derek Xu <derekx@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-18 19:39:05 +00:00
extra_nonproduct_deps = [ "vm:libprotozero" ]
extra_deps = [
":generate_version_cc_file",
"../third_party/double-conversion/src:libdouble_conversion",
]
if (is_fuchsia) {
Reland "[Fuchsia] Remove the legacy gn build rules for fuchsia" This change may require a codereview from flutter side before moving forward. See https://github.com/flutter/engine/pull/51072. This reverts commit 283051acba091ca172d089cecf6bbe401030014e. Reason for revert: Redo the change with the similar one in flutter. After this change, the next dart -> flutter roll needs extra cares in https://github.com/flutter/engine/pull/51072. It also contains more details about the reason why it could not be two-way compatible. Original change's description: > Revert "[Fuchsia] Remove the legacy gn build rules for fuchsia" > > This reverts commit 094202bb91f881e7a4a3b44246842dfed9370fce. > > Reason for revert: Break flutter, this change should happen after > flutter being migrated to the same gn-sdk. > > Original change's description: > > [Fuchsia] Remove the legacy gn build rules for fuchsia > > > > The updated test-scripts contains https://crrev.com/c/5341620 which > > allows to generate fidl apis with an env var controlled location > > rather than a hard-coded one. So the existing fuchsia gn build rules > > in dart/sdk become obsolete and can be fully removed in favor of the > > one in //third_party/fuchsia/gn-sdk/. > > > > Meanwhile the gn-sdk has been updated with > > https://crrev.com/c/5325282 to use api-level version'ed idk but not > > the ones in arch/. > > > > Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try > > Tested: ^^^^^ > > Bug: 40935282 > > Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283 > > Reviewed-by: Ryan Macnak <rmacnak@google.com> > > Reviewed-by: Alexander Thomas <athom@google.com> > > Commit-Queue: Zijie He <zijiehe@google.com> > > Bug: 40935282 > Change-Id: I7c455d1d362210523671c97d99ef018ede1743f4 > Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356307 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Auto-Submit: Zijie He <zijiehe@google.com> > Reviewed-by: Derek Xu <derekx@google.com> > Commit-Queue: Zijie He <zijiehe@google.com> Bug: 40935282 Change-Id: Id5a9a98013350359037b19f8506f24158c9a3120 Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356924 Commit-Queue: Zijie He <zijiehe@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-03-14 20:22:12 +00:00
extra_deps += [
"$fuchsia_sdk/pkg/fdio",
"$fuchsia_sdk/pkg/trace-engine",
]
}
configurable_deps = [
"platform:libdart_platform",
"vm:libdart_lib",
"vm:libdart_vm",
]
compiler_lib = "vm:libdart_compiler"
extra_configs = [ ":dart_shared_lib" ]
include_dirs = [ "." ]
public_configs = [ ":dart_public_config" ]
sources = [
"$target_gen_dir/version.cc",
Fixes for reland for analyze_snapshot program 1. Disable copying of executable for SDK binary signing 2. Fixes for ASAN memory leak in executable TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart This is a reland of 5d7d8a377dec742bd388849d139dbabdf9bee767 Original change's description: > Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"" > > This is a reland of 8d1eedca64d29e0e25d4536e4b145bf584c83eed > > Disable builds for Fuchsia > > TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart > Original change's description: > > Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection" > > > > This is a reland of 19e57493088ac57c1f3f45918b9dc97d15de42e0 > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > Original change's description: > > > [vm] Add analyze_snapshot tool for AOT snapshot inspection > > > > > > Current skeleton to allow for instrumentation snapshots that can be > > > built alongside Dart compilation artifacts and easily referenced for > > > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine > > > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > > > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68 > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087 > > > Reviewed-by: Slava Egorov <vegorov@google.com> > > > Commit-Queue: Slava Egorov <vegorov@google.com> > > > > Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526 > > Reviewed-by: Slava Egorov <vegorov@google.com> > > Commit-Queue: Slava Egorov <vegorov@google.com> > > Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890 > Reviewed-by: Slava Egorov <vegorov@google.com> > Commit-Queue: Chris Evans <cmevans@google.com> Change-Id: I1e6e57dda56f1710cc3a52e35d4067910930a701 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234500 Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Chris Evans <cmevans@google.com> Commit-Queue: Chris Evans <cmevans@google.com>
2022-03-09 14:17:44 +00:00
"include/analyze_snapshot_api.h",
"include/dart_api.h",
"include/dart_native_api.h",
"include/dart_tools_api.h",
Fixes for reland for analyze_snapshot program 1. Disable copying of executable for SDK binary signing 2. Fixes for ASAN memory leak in executable TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart This is a reland of 5d7d8a377dec742bd388849d139dbabdf9bee767 Original change's description: > Reland "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"" > > This is a reland of 8d1eedca64d29e0e25d4536e4b145bf584c83eed > > Disable builds for Fuchsia > > TEST=runtime/tests/vm/dart_2/analyze_snapshot_binary_test.dart > Original change's description: > > Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection" > > > > This is a reland of 19e57493088ac57c1f3f45918b9dc97d15de42e0 > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > Original change's description: > > > [vm] Add analyze_snapshot tool for AOT snapshot inspection > > > > > > Current skeleton to allow for instrumentation snapshots that can be > > > built alongside Dart compilation artifacts and easily referenced for > > > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine > > > > > > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart > > > > > > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68 > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087 > > > Reviewed-by: Slava Egorov <vegorov@google.com> > > > Commit-Queue: Slava Egorov <vegorov@google.com> > > > > Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526 > > Reviewed-by: Slava Egorov <vegorov@google.com> > > Commit-Queue: Slava Egorov <vegorov@google.com> > > Change-Id: I769ced4cbe6eb926b8df36a15ca13c3145632082 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233890 > Reviewed-by: Slava Egorov <vegorov@google.com> > Commit-Queue: Chris Evans <cmevans@google.com> Change-Id: I1e6e57dda56f1710cc3a52e35d4067910930a701 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234500 Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Chris Evans <cmevans@google.com> Commit-Queue: Chris Evans <cmevans@google.com>
2022-03-09 14:17:44 +00:00
"vm/analyze_snapshot_api_impl.cc",
"vm/dart_api_impl.cc",
"vm/native_api_impl.cc",
"vm/version.h",
]
}
action("generate_version_cc_file") {
inputs = [
"../tools/utils.py",
"../tools/VERSION",
"vm/version_in.cc",
]
if (dart_version_git_info) {
inputs += [ "$default_git_folder/logs/HEAD" ]
}
output = "$target_gen_dir/version.cc"
outputs = [ output ]
script = "../tools/make_version.py"
args = [
"--quiet",
"--output",
rebase_path(output, root_build_dir),
"--input",
rebase_path("vm/version_in.cc", root_build_dir),
]
if (!dart_version_git_info) {
args += [ "--no-git-hash" ]
}
if (!verify_sdk_hash) {
args += [ "--no-sdk-hash" ]
}
}