11cb0ef41Sopenharmony_ci# Copyright 2019 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci# found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciimport("../../gni/snapshot_toolchain.gni") 61cb0ef41Sopenharmony_ciimport("../../gni/v8.gni") 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciconfig("internal_config") { 91cb0ef41Sopenharmony_ci visibility = [ ":*" ] # Only targets in this file can depend on this. 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci if (is_component_build) { 121cb0ef41Sopenharmony_ci defines = [ "BUILDING_V8_DEBUG_HELPER" ] 131cb0ef41Sopenharmony_ci } 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci configs = [ "../..:v8_tracing_config" ] 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ci include_dirs = [ 181cb0ef41Sopenharmony_ci ".", 191cb0ef41Sopenharmony_ci "../..", 201cb0ef41Sopenharmony_ci "$target_gen_dir", 211cb0ef41Sopenharmony_ci "$target_gen_dir/../..", 221cb0ef41Sopenharmony_ci ] 231cb0ef41Sopenharmony_ci} 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ci# This config should be applied to code using v8_debug_helper. 261cb0ef41Sopenharmony_ciconfig("external_config") { 271cb0ef41Sopenharmony_ci if (is_component_build) { 281cb0ef41Sopenharmony_ci defines = [ "USING_V8_DEBUG_HELPER" ] 291cb0ef41Sopenharmony_ci } 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci configs = [ "../..:external_config" ] 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ci include_dirs = [ "." ] 341cb0ef41Sopenharmony_ci} 351cb0ef41Sopenharmony_ci 361cb0ef41Sopenharmony_ciaction("run_mkgrokdump") { 371cb0ef41Sopenharmony_ci testonly = true 381cb0ef41Sopenharmony_ci visibility = [ ":*" ] 391cb0ef41Sopenharmony_ci 401cb0ef41Sopenharmony_ci deps = [ 411cb0ef41Sopenharmony_ci "../..:run_mksnapshot_default", 421cb0ef41Sopenharmony_ci "../../test/mkgrokdump:mkgrokdump($v8_generator_toolchain)", 431cb0ef41Sopenharmony_ci ] 441cb0ef41Sopenharmony_ci 451cb0ef41Sopenharmony_ci script = "../run.py" 461cb0ef41Sopenharmony_ci 471cb0ef41Sopenharmony_ci outputs = [ "$target_gen_dir/v8heapconst.py" ] 481cb0ef41Sopenharmony_ci 491cb0ef41Sopenharmony_ci args = [ 501cb0ef41Sopenharmony_ci "./" + rebase_path( 511cb0ef41Sopenharmony_ci get_label_info( 521cb0ef41Sopenharmony_ci "../../test/mkgrokdump:mkgrokdump($v8_generator_toolchain)", 531cb0ef41Sopenharmony_ci "root_out_dir") + "/mkgrokdump", 541cb0ef41Sopenharmony_ci root_build_dir), 551cb0ef41Sopenharmony_ci "--outfile", 561cb0ef41Sopenharmony_ci rebase_path("$target_gen_dir/v8heapconst.py", root_build_dir), 571cb0ef41Sopenharmony_ci ] 581cb0ef41Sopenharmony_ci} 591cb0ef41Sopenharmony_ci 601cb0ef41Sopenharmony_ciaction("gen_heap_constants") { 611cb0ef41Sopenharmony_ci testonly = true 621cb0ef41Sopenharmony_ci visibility = [ ":*" ] 631cb0ef41Sopenharmony_ci deps = [ ":run_mkgrokdump" ] 641cb0ef41Sopenharmony_ci script = "gen-heap-constants.py" 651cb0ef41Sopenharmony_ci outputs = [ "$target_gen_dir/heap-constants-gen.cc" ] 661cb0ef41Sopenharmony_ci args = [ 671cb0ef41Sopenharmony_ci rebase_path(target_gen_dir, root_build_dir), 681cb0ef41Sopenharmony_ci rebase_path("$target_gen_dir/heap-constants-gen.cc", root_build_dir), 691cb0ef41Sopenharmony_ci ] 701cb0ef41Sopenharmony_ci} 711cb0ef41Sopenharmony_ci 721cb0ef41Sopenharmony_civ8_component("v8_debug_helper") { 731cb0ef41Sopenharmony_ci testonly = true 741cb0ef41Sopenharmony_ci 751cb0ef41Sopenharmony_ci public = [ "debug-helper.h" ] 761cb0ef41Sopenharmony_ci 771cb0ef41Sopenharmony_ci sources = [ 781cb0ef41Sopenharmony_ci "$target_gen_dir/../../torque-generated/class-debug-readers.cc", 791cb0ef41Sopenharmony_ci "$target_gen_dir/../../torque-generated/class-debug-readers.h", 801cb0ef41Sopenharmony_ci "$target_gen_dir/../../torque-generated/debug-macros.cc", 811cb0ef41Sopenharmony_ci "$target_gen_dir/../../torque-generated/debug-macros.h", 821cb0ef41Sopenharmony_ci "$target_gen_dir/../../torque-generated/instance-types.h", 831cb0ef41Sopenharmony_ci "$target_gen_dir/heap-constants-gen.cc", 841cb0ef41Sopenharmony_ci "compiler-types.cc", 851cb0ef41Sopenharmony_ci "debug-helper-internal.cc", 861cb0ef41Sopenharmony_ci "debug-helper-internal.h", 871cb0ef41Sopenharmony_ci "debug-helper.h", 881cb0ef41Sopenharmony_ci "get-object-properties.cc", 891cb0ef41Sopenharmony_ci "heap-constants.cc", 901cb0ef41Sopenharmony_ci "heap-constants.h", 911cb0ef41Sopenharmony_ci "list-object-classes.cc", 921cb0ef41Sopenharmony_ci ] 931cb0ef41Sopenharmony_ci 941cb0ef41Sopenharmony_ci deps = [ 951cb0ef41Sopenharmony_ci ":gen_heap_constants", 961cb0ef41Sopenharmony_ci "../..:generate_bytecode_builtins_list", 971cb0ef41Sopenharmony_ci "../..:run_torque", 981cb0ef41Sopenharmony_ci "../..:v8_headers", 991cb0ef41Sopenharmony_ci "../..:v8_internal_headers", 1001cb0ef41Sopenharmony_ci "../..:v8_libbase", 1011cb0ef41Sopenharmony_ci "../..:v8_shared_internal_headers", 1021cb0ef41Sopenharmony_ci "../..:v8_tracing", 1031cb0ef41Sopenharmony_ci ] 1041cb0ef41Sopenharmony_ci 1051cb0ef41Sopenharmony_ci configs = [ ":internal_config" ] 1061cb0ef41Sopenharmony_ci if (v8_enable_i18n_support) { 1071cb0ef41Sopenharmony_ci configs += [ "//third_party/icu:icu_config" ] 1081cb0ef41Sopenharmony_ci } 1091cb0ef41Sopenharmony_ci 1101cb0ef41Sopenharmony_ci remove_configs = [ "//build/config/compiler:no_rtti" ] 1111cb0ef41Sopenharmony_ci configs += [ "//build/config/compiler:rtti" ] 1121cb0ef41Sopenharmony_ci 1131cb0ef41Sopenharmony_ci public_configs = [ ":external_config" ] 1141cb0ef41Sopenharmony_ci} 115