2019-09-24 11:56:38 -04:00
|
|
|
# Copyright 2019 the V8 project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
import("../../gni/snapshot_toolchain.gni")
|
|
|
|
import("../../gni/v8.gni")
|
|
|
|
|
|
|
|
config("internal_config") {
|
|
|
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
|
|
|
|
|
|
|
if (is_component_build) {
|
|
|
|
defines = [ "BUILDING_V8_DEBUG_HELPER" ]
|
|
|
|
}
|
|
|
|
|
2020-07-13 10:39:42 +02:00
|
|
|
configs = [ "../..:v8_tracing_config" ]
|
|
|
|
|
2019-09-24 11:56:38 -04:00
|
|
|
include_dirs = [
|
|
|
|
".",
|
|
|
|
"../..",
|
|
|
|
"$target_gen_dir",
|
|
|
|
"$target_gen_dir/../..",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
# This config should be applied to code using v8_debug_helper.
|
|
|
|
config("external_config") {
|
|
|
|
if (is_component_build) {
|
|
|
|
defines = [ "USING_V8_DEBUG_HELPER" ]
|
|
|
|
}
|
2020-07-13 10:39:42 +02:00
|
|
|
|
|
|
|
configs = [ "../..:external_config" ]
|
|
|
|
|
2019-09-24 11:56:38 -04:00
|
|
|
include_dirs = [ "." ]
|
|
|
|
}
|
|
|
|
|
|
|
|
action("run_mkgrokdump") {
|
|
|
|
testonly = true
|
|
|
|
visibility = [ ":*" ]
|
|
|
|
|
2020-11-13 12:51:53 +01:00
|
|
|
deps = [
|
|
|
|
"../..:run_mksnapshot_default",
|
|
|
|
"../../test/mkgrokdump:mkgrokdump($v8_generator_toolchain)",
|
|
|
|
]
|
2019-09-24 11:56:38 -04:00
|
|
|
|
|
|
|
script = "../run.py"
|
|
|
|
|
2020-05-05 09:19:02 +02:00
|
|
|
outputs = [ "$target_gen_dir/v8heapconst.py" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
|
|
|
|
args = [
|
|
|
|
"./" + rebase_path(
|
|
|
|
get_label_info(
|
|
|
|
"../../test/mkgrokdump:mkgrokdump($v8_generator_toolchain)",
|
|
|
|
"root_out_dir") + "/mkgrokdump",
|
|
|
|
root_build_dir),
|
|
|
|
"--outfile",
|
|
|
|
rebase_path("$target_gen_dir/v8heapconst.py", root_build_dir),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
action("gen_heap_constants") {
|
|
|
|
testonly = true
|
|
|
|
visibility = [ ":*" ]
|
2020-05-05 09:19:02 +02:00
|
|
|
deps = [ ":run_mkgrokdump" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
script = "gen-heap-constants.py"
|
2020-05-05 09:19:02 +02:00
|
|
|
outputs = [ "$target_gen_dir/heap-constants-gen.cc" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
args = [
|
|
|
|
rebase_path(target_gen_dir, root_build_dir),
|
|
|
|
rebase_path("$target_gen_dir/heap-constants-gen.cc", root_build_dir),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-03-30 12:11:08 +02:00
|
|
|
v8_component("v8_debug_helper_internal") {
|
2019-09-24 11:56:38 -04:00
|
|
|
testonly = true
|
|
|
|
|
2020-05-05 09:19:02 +02:00
|
|
|
public = [ "debug-helper.h" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
|
|
|
|
sources = [
|
2020-11-13 12:51:53 +01:00
|
|
|
"$target_gen_dir/../../torque-generated/class-debug-readers.cc",
|
|
|
|
"$target_gen_dir/../../torque-generated/class-debug-readers.h",
|
2021-03-12 08:24:20 +01:00
|
|
|
"$target_gen_dir/../../torque-generated/debug-macros.cc",
|
|
|
|
"$target_gen_dir/../../torque-generated/debug-macros.h",
|
2020-11-13 12:51:53 +01:00
|
|
|
"$target_gen_dir/../../torque-generated/instance-types.h",
|
2019-09-24 11:56:38 -04:00
|
|
|
"$target_gen_dir/heap-constants-gen.cc",
|
2023-03-30 12:11:08 +02:00
|
|
|
"../../src/common/ptr-compr.cc",
|
2020-10-15 20:17:08 +02:00
|
|
|
"compiler-types.cc",
|
2019-09-24 11:56:38 -04:00
|
|
|
"debug-helper-internal.cc",
|
|
|
|
"debug-helper-internal.h",
|
|
|
|
"debug-helper.h",
|
|
|
|
"get-object-properties.cc",
|
|
|
|
"heap-constants.cc",
|
|
|
|
"heap-constants.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gen_heap_constants",
|
2020-05-05 09:19:02 +02:00
|
|
|
"../..:generate_bytecode_builtins_list",
|
2019-09-24 11:56:38 -04:00
|
|
|
"../..:run_torque",
|
2023-10-05 08:46:07 +02:00
|
|
|
"../..:v8_abseil",
|
2019-09-24 11:56:38 -04:00
|
|
|
"../..:v8_headers",
|
2021-06-08 14:04:59 +02:00
|
|
|
"../..:v8_internal_headers",
|
2019-09-24 11:56:38 -04:00
|
|
|
"../..:v8_libbase",
|
2021-03-12 08:24:20 +01:00
|
|
|
"../..:v8_shared_internal_headers",
|
|
|
|
"../..:v8_tracing",
|
2019-09-24 11:56:38 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
configs = [ ":internal_config" ]
|
|
|
|
if (v8_enable_i18n_support) {
|
2023-03-30 12:11:08 +02:00
|
|
|
configs += [ "$v8_icu_path:icu_config" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
}
|
|
|
|
|
2019-11-08 15:39:11 +01:00
|
|
|
remove_configs = [ "//build/config/compiler:no_rtti" ]
|
|
|
|
configs += [ "//build/config/compiler:rtti" ]
|
2023-03-30 12:11:08 +02:00
|
|
|
}
|
2019-11-08 15:39:11 +01:00
|
|
|
|
2023-03-30 12:11:08 +02:00
|
|
|
group("v8_debug_helper") {
|
|
|
|
testonly = true
|
|
|
|
public_deps = [ ":v8_debug_helper_internal" ]
|
2019-09-24 11:56:38 -04:00
|
|
|
public_configs = [ ":external_config" ]
|
|
|
|
}
|