1# Copyright 2014 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/android/config.gni") 6import("//build/config/arm.gni") 7import("//build/config/dcheck_always_on.gni") 8import("//build/config/host_byteorder.gni") 9import("//build/config/mips.gni") 10import("//build/config/sanitizers/sanitizers.gni") 11import("//build_overrides/build.gni") 12 13if (is_android) { 14 import("//build/config/android/rules.gni") 15} 16 17import("gni/snapshot_toolchain.gni") 18import("gni/v8.gni") 19 20# Specifies if the target build is a simulator build. Comparing target cpu 21# with v8 target cpu to not affect simulator builds for making cross-compile 22# snapshots. 23target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) || 24 (current_cpu != v8_current_cpu && v8_multi_arch_build) 25 26# For faster Windows builds. See https://crbug.com/v8/8475. 27emit_builtins_as_inline_asm = is_win && is_clang 28 29declare_args() { 30 # Print to stdout on Android. 31 v8_android_log_stdout = false 32 33 # Dynamically set an additional dependency from v8/custom_deps. 34 v8_custom_deps = "" 35 36 # Turns on all V8 debug features. Enables running V8 in a pseudo debug mode 37 # within a release Chrome. 38 v8_enable_debugging_features = is_debug 39 40 # Sets -DV8_ENABLE_FUTURE. 41 v8_enable_future = false 42 43 # Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing 44 v8_enable_system_instrumentation = (is_win || is_mac) && !v8_use_perfetto 45 46 # Sets the GUID for the ETW provider 47 v8_etw_guid = "" 48 49 # Sets -DVERIFY_HEAP. 50 v8_enable_verify_heap = "" 51 52 # Sets -DVERIFY_PREDICTABLE 53 v8_enable_verify_predictable = false 54 55 # Enable compiler warnings when using V8_DEPRECATED apis. 56 v8_deprecation_warnings = true 57 58 # Enable compiler warnings when using V8_DEPRECATE_SOON apis. 59 v8_imminent_deprecation_warnings = true 60 61 # Embeds the given script into the snapshot. 62 v8_embed_script = "" 63 64 # Allows the embedder to add a custom suffix to the version string. 65 v8_embedder_string = "" 66 67 # Sets -dENABLE_DISASSEMBLER. 68 v8_enable_disassembler = "" 69 70 # Sets the number of internal fields on promise objects. 71 v8_promise_internal_field_count = 0 72 73 # Sets -dENABLE_GDB_JIT_INTERFACE. 74 v8_enable_gdbjit = "" 75 76 # Sets -dENABLE_VTUNE_JIT_INTERFACE. 77 v8_enable_vtunejit = false 78 79 # Sets -dENABLE_VTUNE_TRACEMARK. 80 v8_enable_vtunetracemark = false 81 82 # Sets -dENABLE_HUGEPAGE 83 v8_enable_hugepage = false 84 85 # Sets -dV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION. 86 # 87 # This flag speeds up the performance of fork/execve on Linux systems for 88 # embedders which use it (like Node.js). It works by marking the pages that 89 # V8 allocates as MADV_DONTFORK. Without MADV_DONTFORK, the Linux kernel 90 # spends a long time manipulating page mappings on fork and exec which the 91 # child process doesn't generally need to access. 92 # 93 # See v8:7381 for more details. 94 v8_enable_private_mapping_fork_optimization = false 95 96 # Sets -dENABLE_HANDLE_ZAPPING. 97 v8_enable_handle_zapping = !is_on_release_branch || is_debug 98 99 # Enable slow dchecks. 100 v8_enable_slow_dchecks = false 101 102 # Enable fast mksnapshot runs. 103 v8_enable_fast_mksnapshot = false 104 105 # Optimize code for Torque executable, even during a debug build. 106 v8_enable_fast_torque = "" 107 108 # Enable the registration of unwinding info for Windows x64 and ARM64. 109 v8_win64_unwinding_info = true 110 111 # Enable code comments for builtins in the snapshot (impacts performance). 112 # This also enables v8_code_comments. 113 v8_enable_snapshot_code_comments = false 114 115 # Allow runtime-enabled code comments (with --code-comments). Enabled by 116 # default in debug builds. 117 # Sets -dV8_CODE_COMMENTS 118 v8_code_comments = "" 119 120 # Allow runtime-enabled debug code (with --debug-code). Enabled by default in 121 # debug builds. 122 # Sets -dV8_ENABLE_DEBUG_CODE 123 v8_enable_debug_code = "" 124 125 # Enable native counters from the snapshot (impacts performance, sets 126 # -dV8_SNAPSHOT_NATIVE_CODE_COUNTERS). 127 # This option will generate extra code in the snapshot to increment counters, 128 # as per the --native-code-counters flag. 129 v8_enable_snapshot_native_code_counters = "" 130 131 # Enable code-generation-time checking of types in the CodeStubAssembler. 132 v8_enable_verify_csa = false 133 134 # Enable pointer compression (sets -dV8_COMPRESS_POINTERS). 135 v8_enable_pointer_compression = "" 136 v8_enable_pointer_compression_shared_cage = "" 137 v8_enable_31bit_smis_on_64bit_arch = false 138 139 # Sets -dOBJECT_PRINT. 140 v8_enable_object_print = "" 141 142 # Sets -dV8_TRACE_MAPS. 143 v8_enable_trace_maps = "" 144 145 # Sets -dV8_ENABLE_CHECKS. 146 v8_enable_v8_checks = "" 147 148 # Sets -dV8_TRACE_UNOPTIMIZED. 149 v8_enable_trace_unoptimized = "" 150 v8_enable_trace_ignition = false 151 v8_enable_trace_baseline_exec = false 152 153 # Sets -dV8_TRACE_FEEDBACK_UPDATES. 154 v8_enable_trace_feedback_updates = false 155 156 # Sets -dV8_ATOMIC_OBJECT_FIELD_WRITES and turns all field write operations 157 # into relaxed atomic operations. 158 v8_enable_atomic_object_field_writes = "" 159 160 # Controls the default value of v8_enable_concurrent_marking_state. See the 161 # default setting code below. 162 v8_enable_concurrent_marking = true 163 164 # Sets -dV8_IGNITION_DISPATCH_COUNTING. 165 # Enables counting frequencies of bytecode dispatches. After building in this 166 # configuration, subsequent runs of d8 can output frequencies for each pair 167 # of (current, next) bytecode instructions executed if you specify 168 # --trace-ignition-dispatches-output-file, or can generate a JS object with 169 # those frequencies if you run with --expose-ignition-statistics and call the 170 # extension function getIgnitionDispatchCounters(). 171 v8_enable_ignition_dispatch_counting = false 172 173 # Runs mksnapshot with --turbo-profiling. After building in this 174 # configuration, any subsequent run of d8 will output information about usage 175 # of basic blocks in builtins. 176 v8_enable_builtins_profiling = false 177 178 # Runs mksnapshot with --turbo-profiling-verbose. After building in this 179 # configuration, any subsequent run of d8 will output information about usage 180 # of basic blocks in builtins, including the schedule and disassembly of all 181 # used builtins. 182 v8_enable_builtins_profiling_verbose = false 183 184 # Provides the given V8 log file as an input to mksnapshot, where it can be 185 # used for profile-guided optimization of builtins. 186 # 187 # To do profile-guided optimizations of builtins: 188 # 1. Build with v8_enable_builtins_profiling = true 189 # 2. Run your chosen workload with the --turbo-profiling-log-builtins flag. 190 # For Chrome, the invocation might look like this: 191 # chrome --no-sandbox --disable-extensions 192 # --js-flags="--turbo-profiling-log-builtins --logfile=path/to/v8.log" 193 # "http://localhost/test-suite" 194 # 3. Optionally repeat step 2 for additional workloads, and concatenate all of 195 # the resulting log files into a single file. 196 # 4. Build again with v8_builtins_profiling_log_file set to the file created 197 # in steps 2-3. 198 v8_builtins_profiling_log_file = "" 199 200 # Enables various testing features. 201 v8_enable_test_features = "" 202 203 # Enable short builtins call instruction sequences by un-embedding builtins. 204 # Sets -dV8_SHORT_BUILTIN_CALLS 205 v8_enable_short_builtin_calls = "" 206 207 # Enable support for external code range relative to the pointer compression 208 # cage. 209 # Sets -dV8_EXTERNAL_CODE_SPACE 210 v8_enable_external_code_space = "" 211 212 # Enable the Maglev compiler. 213 # Sets -dV8_ENABLE_MAGLEV 214 v8_enable_maglev = "" 215 216 # With post mortem support enabled, metadata is embedded into libv8 that 217 # describes various parameters of the VM for use by debuggers. See 218 # tools/gen-postmortem-metadata.py for details. 219 v8_postmortem_support = false 220 221 # Use Siphash as added protection against hash flooding attacks. 222 v8_use_siphash = false 223 224 # Switches off inlining in V8. 225 v8_no_inline = false 226 227 # Override OS page size when generating snapshot 228 v8_os_page_size = "0" 229 230 # Similar to vfp but on MIPS. 231 v8_can_use_fpu_instructions = true 232 233 # Similar to the ARM hard float ABI but on MIPS. 234 v8_use_mips_abi_hardfloat = true 235 236 # Controls the threshold for on-heap/off-heap Typed Arrays. 237 v8_typed_array_max_size_in_heap = 64 238 239 v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64") && 240 (is_linux || is_chromeos || is_mac)) || 241 (v8_current_cpu == "ppc64" && (is_linux || is_chromeos)) 242 243 # Check that each header can be included in isolation (requires also 244 # setting the "check_v8_header_includes" gclient variable to run a 245 # specific hook). 246 v8_check_header_includes = false 247 248 # Enable sharing read-only space across isolates. 249 # Sets -DV8_SHARED_RO_HEAP. 250 v8_enable_shared_ro_heap = "" 251 252 # Enable lazy source positions by default. 253 v8_enable_lazy_source_positions = true 254 255 # Enable third party HEAP library 256 v8_enable_third_party_heap = false 257 258 # Libaries used by third party heap 259 v8_third_party_heap_libs = [] 260 261 # Source code used by third party heap 262 v8_third_party_heap_files = [] 263 264 # Disable write barriers when GCs are non-incremental and 265 # heap has single generation. 266 v8_disable_write_barriers = false 267 268 # Ensure that write barriers are always used. 269 # Useful for debugging purposes. 270 v8_enable_unconditional_write_barriers = false 271 272 # Redirect allocation in young generation so that there will be 273 # only one single generation. 274 v8_enable_single_generation = "" 275 276 # Use token threaded dispatch for the regular expression interpreter. 277 # Use switch-based dispatch if this is false 278 v8_enable_regexp_interpreter_threaded_dispatch = true 279 280 # Enable additional targets necessary for verification of torque 281 # file generation 282 v8_verify_torque_generation_invariance = false 283 284 # Generate comments describing the Torque intermediate representation. 285 v8_annotate_torque_ir = false 286 287 # Enable snapshot compression (enabled by default for desktop) devices. 288 v8_enable_snapshot_compression = 289 target_os == "android" || target_os == "chromeos" || 290 target_os == "fuchsia" 291 292 # Enable control-flow integrity features, such as pointer authentication for 293 # ARM64. 294 v8_control_flow_integrity = false 295 296 # Enable heap reservation of size 4GB. Only possible for 64bit archs. 297 cppgc_enable_caged_heap = 298 v8_current_cpu == "x64" || v8_current_cpu == "arm64" || 299 v8_current_cpu == "loong64" 300 301 # Enables additional heap verification phases and checks. 302 cppgc_enable_verify_heap = "" 303 304 # Enable allocations during prefinalizer invocations. 305 cppgc_allow_allocations_in_prefinalizers = false 306 307 # Enable V8 zone compression experimental feature. 308 # Sets -DV8_COMPRESS_ZONES. 309 v8_enable_zone_compression = "" 310 311 # Enable the experimental V8 sandbox. 312 # Sets -DV8_SANDBOX. 313 v8_enable_sandbox = "" 314 315 # Enable external pointer sandboxing. Requires v8_enable_sandbox. 316 # Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS. 317 v8_enable_sandboxed_external_pointers = false 318 319 # Enable sandboxed pointers. Requires v8_enable_sandbox. 320 # Sets -DV8_SANDBOXED_POINTERS. 321 v8_enable_sandboxed_pointers = false 322 323 # Enable all available sandbox features. Implies v8_enable_sandbox. 324 v8_enable_sandbox_future = false 325 326 # Experimental feature for collecting per-class zone memory stats. 327 # Requires use_rtti = true 328 v8_enable_precise_zone_stats = false 329 330 # Experimental feature that uses SwissNameDictionary instead of NameDictionary 331 # as the backing store for all dictionary mode objects. 332 v8_enable_swiss_name_dictionary = false 333 334 # If enabled then macro definitions that are used in externally visible 335 # header files are placed in a separate header file v8-gn.h. 336 v8_generate_external_defines_header = false 337 338 # Experimental feature for tracking constness of properties in non-global 339 # dictionaries. Enabling this also always keeps prototypes in dict mode, 340 # meaning that they are not switched to fast mode. 341 # Sets -DV8_DICT_PROPERTY_CONST_TRACKING 342 v8_dict_property_const_tracking = false 343 344 # Enable map packing & unpacking (sets -dV8_MAP_PACKING). 345 v8_enable_map_packing = false 346 347 # Allow for JS promise hooks (instead of just C++). 348 v8_enable_javascript_promise_hooks = false 349 350 # Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING). 351 # When it's disabled, the --turbo-allocation-folding runtime flag will be ignored. 352 v8_enable_allocation_folding = true 353 354 # Enable runtime verification of heap snapshots produced for devtools. 355 v8_enable_heap_snapshot_verify = "" 356 357 # Enable global allocation site tracking. 358 v8_allocation_site_tracking = true 359 360 # TODO(cbruni, v8:12302): Remove once API is migrated 361 # Enable legacy mode for ScriptOrModule's lifetime. By default it's a 362 # temporary object, if enabled it will be kept alive by the parent Script. 363 # This is only used by nodejs. 364 v8_scriptormodule_legacy_lifetime = false 365 366 # Change code emission and runtime features to be CET shadow-stack compliant 367 # (incomplete and experimental). 368 v8_enable_cet_shadow_stack = false 369 370 # Get VMEX priviledge at startup. 371 # It allows to run V8 without "deprecated-ambient-replace-as-executable". 372 # Sets -DV8_USE_VMEX_RESOURCE. 373 # TODO(victorgomes): Remove this flag once Chormium no longer needs 374 # the deprecated feature. 375 v8_fuchsia_use_vmex_resource = is_fuchsia && !build_with_chromium 376} 377 378# Derived defaults. 379if (cppgc_enable_verify_heap == "") { 380 cppgc_enable_verify_heap = v8_enable_debugging_features || dcheck_always_on 381} 382if (v8_enable_verify_heap == "") { 383 v8_enable_verify_heap = v8_enable_debugging_features 384} 385if (v8_enable_object_print == "") { 386 v8_enable_object_print = v8_enable_debugging_features 387} 388if (v8_enable_disassembler == "") { 389 v8_enable_disassembler = v8_enable_debugging_features 390} 391if (v8_enable_trace_maps == "") { 392 v8_enable_trace_maps = v8_enable_debugging_features 393} 394if (v8_enable_test_features == "") { 395 v8_enable_test_features = v8_enable_debugging_features || dcheck_always_on 396} 397if (v8_enable_v8_checks == "") { 398 v8_enable_v8_checks = v8_enable_debugging_features 399} 400if (v8_enable_heap_snapshot_verify == "") { 401 v8_enable_heap_snapshot_verify = 402 v8_enable_debugging_features || dcheck_always_on 403} 404if (v8_enable_snapshot_code_comments) { 405 assert(v8_code_comments == true || v8_code_comments == "", 406 "v8_enable_snapshot_code_comments conflicts with v8_code_comments.") 407 v8_code_comments = true 408} else if (v8_code_comments == "") { 409 v8_code_comments = v8_enable_debugging_features 410} 411if (v8_enable_debug_code == "") { 412 v8_enable_debug_code = v8_enable_debugging_features 413} 414if (v8_enable_snapshot_native_code_counters == "") { 415 v8_enable_snapshot_native_code_counters = v8_enable_debugging_features 416} 417if (v8_enable_pointer_compression == "") { 418 v8_enable_pointer_compression = 419 v8_current_cpu == "arm64" || v8_current_cpu == "x64" 420} 421if (v8_enable_pointer_compression_shared_cage == "") { 422 v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression 423} 424if (v8_enable_fast_torque == "") { 425 v8_enable_fast_torque = v8_enable_fast_mksnapshot 426} 427if (v8_enable_zone_compression == "") { 428 v8_enable_zone_compression = false 429} 430if (v8_enable_short_builtin_calls == "") { 431 v8_enable_short_builtin_calls = 432 v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64") 433} 434if (v8_enable_external_code_space == "") { 435 v8_enable_external_code_space = 436 v8_enable_pointer_compression && 437 (v8_current_cpu == "x64" || 438 (target_os != "fuchsia" && v8_current_cpu == "arm64")) 439} 440if (v8_enable_maglev == "") { 441 v8_enable_maglev = v8_current_cpu == "x64" && v8_enable_pointer_compression 442} 443if (v8_enable_single_generation == "") { 444 v8_enable_single_generation = v8_disable_write_barriers 445} 446if (v8_enable_atomic_object_field_writes == "") { 447 v8_enable_atomic_object_field_writes = v8_enable_concurrent_marking 448} 449if (v8_enable_third_party_heap) { 450 v8_disable_write_barriers = true 451 v8_enable_single_generation = true 452 v8_enable_shared_ro_heap = false 453 v8_enable_pointer_compression = false 454 v8_enable_pointer_compression_shared_cage = false 455 v8_enable_allocation_folding = false 456} 457if (v8_enable_single_generation) { 458 v8_allocation_site_tracking = false 459} 460assert(!v8_enable_concurrent_marking || v8_enable_atomic_object_field_writes, 461 "Concurrent marking requires atomic object field writes.") 462if (v8_enable_trace_unoptimized == "") { 463 v8_enable_trace_unoptimized = 464 v8_enable_trace_ignition || v8_enable_trace_baseline_exec 465} 466assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized, 467 "Ignition tracing requires unoptimized tracing to be enabled.") 468assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized, 469 "Baseline tracing requires unoptimized tracing to be enabled.") 470 471# Toggle pointer compression for correctness fuzzing when building the 472# clang_x64_pointer_compression toolchain. We'll correctness-compare the 473# default build with the clang_x64_pointer_compression build. 474if (v8_multi_arch_build && 475 rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) == 476 "clang_x64_pointer_compression") { 477 v8_enable_pointer_compression = !v8_enable_pointer_compression 478 v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression 479 v8_enable_external_code_space = v8_enable_pointer_compression 480} 481 482# Check if it is a Chromium build and activate PAC/BTI if needed. 483# TODO(cavalcantii): have a single point of integration with PAC/BTI flags. 484if (build_with_chromium && v8_current_cpu == "arm64" && 485 (arm_control_flow_integrity == "standard" || 486 arm_control_flow_integrity == "pac")) { 487 v8_control_flow_integrity = true 488} 489 490if (v8_enable_short_builtin_calls && 491 ((!v8_enable_pointer_compression && v8_current_cpu != "x64") || 492 v8_control_flow_integrity)) { 493 # Disable short calls when pointer compression is not enabled. 494 # Or when CFI is enabled (until the CFI-related issues are fixed), except x64, 495 # where short builtin calls can still be enabled if the code range is 496 # guaranteed to be close enough to embedded builtins. 497 v8_enable_short_builtin_calls = false 498} 499if (v8_enable_shared_ro_heap == "") { 500 v8_enable_shared_ro_heap = !v8_enable_pointer_compression || 501 v8_enable_pointer_compression_shared_cage 502} 503 504if (v8_enable_sandbox == "") { 505 # TODO(saelo, v8:11880) remove dependency on v8_enable_external_code_space 506 # once that is enabled everywhere by default. 507 v8_enable_sandbox = 508 build_with_chromium && v8_enable_pointer_compression_shared_cage && 509 v8_enable_external_code_space 510} 511 512# Enable all available sandbox features if sandbox future is enabled. 513if (v8_enable_sandbox_future) { 514 v8_enable_sandboxed_pointers = true 515 v8_enable_sandboxed_external_pointers = true 516 v8_enable_sandbox = true 517} 518 519assert(!v8_disable_write_barriers || v8_enable_single_generation, 520 "Disabling write barriers works only with single generation") 521 522assert(v8_current_cpu == "arm64" || !v8_control_flow_integrity, 523 "Control-flow integrity is only supported on arm64") 524 525if (v8_enable_shared_ro_heap && v8_enable_pointer_compression && 526 !v8_enable_pointer_compression_shared_cage) { 527 assert( 528 is_linux || is_chromeos || is_android, 529 "Sharing read-only heap with pointer compression is only supported on Linux or Android") 530} 531 532assert(!v8_enable_map_packing || !v8_enable_pointer_compression, 533 "Map packing does not support pointer compression") 534 535assert(!v8_enable_map_packing || v8_current_cpu == "x64", 536 "Map packing is only supported on x64") 537 538assert(!v8_enable_external_code_space || v8_enable_pointer_compression, 539 "External code space feature requires pointer compression") 540 541assert(!v8_enable_sandbox || v8_enable_pointer_compression_shared_cage, 542 "The sandbox requires the shared pointer compression cage") 543 544assert(!v8_enable_sandbox || v8_enable_external_code_space, 545 "The sandbox requires the external code space") 546 547assert(!v8_enable_sandboxed_pointers || v8_enable_sandbox, 548 "Sandboxed pointers require the sandbox") 549 550assert(!v8_enable_sandboxed_external_pointers || v8_enable_sandbox, 551 "Sandboxed external pointers require the sandbox") 552 553assert( 554 !v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression, 555 "Can't share a pointer compression cage if pointers aren't compressed") 556 557assert( 558 !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || 559 v8_current_cpu == "arm64" || v8_current_cpu == "riscv64", 560 "Sharing a pointer compression cage is only supported on x64,arm64 and riscv64") 561 562assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers, 563 "Write barriers can't be both enabled and disabled") 564 565assert(!cppgc_enable_caged_heap || v8_current_cpu == "x64" || 566 v8_current_cpu == "arm64" || v8_current_cpu == "loong64", 567 "CppGC caged heap requires 64bit platforms") 568 569assert(!cppgc_enable_young_generation || cppgc_enable_caged_heap, 570 "Young generation in CppGC requires caged heap") 571 572if (v8_enable_single_generation == true) { 573 assert( 574 v8_enable_unconditional_write_barriers || v8_disable_write_barriers, 575 "Requires unconditional write barriers or none (which disables incremental marking)") 576} 577 578assert(!v8_enable_conservative_stack_scanning || v8_enable_single_generation, 579 "Conservative stack scanning requires single generation") 580 581if (v8_fuchsia_use_vmex_resource) { 582 assert(target_os == "fuchsia", "VMEX resource only available on Fuchsia") 583} 584 585v8_random_seed = "314159265" 586v8_toolset_for_shell = "host" 587 588############################################################################### 589# Configurations 590# 591 592config("internal_config_base") { 593 # Only targets in this file and its subdirs can depend on this. 594 visibility = [ "./*" ] 595 596 configs = [ ":v8_tracing_config" ] 597 598 include_dirs = [ 599 ".", 600 "include", 601 "$target_gen_dir", 602 "$target_gen_dir/include", 603 ] 604} 605 606config("internal_config") { 607 defines = [] 608 609 # Only targets in this file and its subdirs can depend on this. 610 visibility = [ "./*" ] 611 612 configs = [ 613 "//build/config/compiler:wexit_time_destructors", 614 ":internal_config_base", 615 ":v8_header_features", 616 ":cppgc_header_features", 617 ] 618 619 if (is_component_build) { 620 defines += [ "BUILDING_V8_SHARED" ] 621 } 622 623 if (v8_current_cpu == "riscv64") { 624 libs = [ "atomic" ] 625 } 626} 627 628# Should be applied to all targets that write trace events. 629config("v8_tracing_config") { 630 if (v8_use_perfetto) { 631 include_dirs = [ 632 "third_party/perfetto/include", 633 "$root_gen_dir/third_party/perfetto", 634 "$root_gen_dir/third_party/perfetto/build_config", 635 ] 636 } 637} 638 639# This config should be applied to code using the libplatform. 640config("libplatform_config") { 641 include_dirs = [ "include" ] 642 if (is_component_build) { 643 defines = [ "USING_V8_PLATFORM_SHARED" ] 644 } 645} 646 647# This config should be applied to code using the libbase. 648config("libbase_config") { 649 if (is_component_build) { 650 defines = [ "USING_V8_BASE_SHARED" ] 651 } 652 libs = [] 653 if (is_android && current_toolchain != host_toolchain) { 654 libs += [ "log" ] 655 } 656 include_dirs = [ "$target_gen_dir/include" ] 657} 658 659# Standalone cppgc cannot be built within chrome or with perfetto. 660assert(!cppgc_is_standalone || !build_with_chromium) 661assert(!cppgc_is_standalone || !v8_use_perfetto) 662 663# This config should be applied to code using the cppgc_base. 664config("cppgc_base_config") { 665 defines = [] 666 if (cppgc_is_standalone) { 667 defines += [ "CPPGC_IS_STANDALONE" ] 668 } 669} 670 671# This config is only applied to v8_headers and is the basis for external_config 672# but without setting the USING_V8_SHARED define, which means v8_headers can be 673# used inside v8 itself. 674config("headers_config") { 675 defines = [] 676 configs = [ 677 ":v8_header_features", 678 ":cppgc_header_features", 679 ] 680 include_dirs = [ 681 "include", 682 "$target_gen_dir/include", 683 ] 684} 685 686# This config should only be applied to code using V8 and not any V8 code 687# itself. 688config("external_config") { 689 configs = [ ":headers_config" ] 690 defines = [] 691 if (is_component_build) { 692 defines += [ "USING_V8_SHARED" ] 693 } 694 695 if (current_cpu == "riscv64") { 696 libs = [ "atomic" ] 697 } 698} 699 700# This config should only be applied to code that needs to be explicitly 701# aware of whether we are using startup data or not. 702config("external_startup_data") { 703 if (v8_use_external_startup_data) { 704 defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 705 } 706} 707 708# List of defines that can appear in externally visible header files and that 709# are controlled by args.gn. 710external_v8_defines = [ 711 "V8_ENABLE_CHECKS", 712 "V8_COMPRESS_POINTERS", 713 "V8_COMPRESS_POINTERS_IN_SHARED_CAGE", 714 "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE", 715 "V8_31BIT_SMIS_ON_64BIT_ARCH", 716 "V8_COMPRESS_ZONES", 717 "V8_SANDBOX", 718 "V8_SANDBOXED_POINTERS", 719 "V8_SANDBOXED_EXTERNAL_POINTERS", 720 "V8_DEPRECATION_WARNINGS", 721 "V8_IMMINENT_DEPRECATION_WARNINGS", 722 "V8_NO_ARGUMENTS_ADAPTOR", 723 "V8_USE_PERFETTO", 724 "V8_MAP_PACKING", 725 "V8_IS_TSAN", 726] 727 728enabled_external_v8_defines = [] 729 730if (v8_enable_v8_checks) { 731 enabled_external_v8_defines += [ "V8_ENABLE_CHECKS" ] 732} 733if (v8_enable_pointer_compression) { 734 enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS" ] 735 if (v8_enable_pointer_compression_shared_cage) { 736 enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_SHARED_CAGE" ] 737 } else { 738 enabled_external_v8_defines += [ "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE" ] 739 } 740} 741if (v8_enable_pointer_compression || v8_enable_31bit_smis_on_64bit_arch) { 742 enabled_external_v8_defines += [ "V8_31BIT_SMIS_ON_64BIT_ARCH" ] 743} 744if (v8_enable_zone_compression) { 745 enabled_external_v8_defines += [ "V8_COMPRESS_ZONES" ] 746} 747if (v8_enable_sandbox) { 748 enabled_external_v8_defines += [ "V8_SANDBOX" ] 749} 750if (v8_enable_sandboxed_pointers) { 751 enabled_external_v8_defines += [ "V8_SANDBOXED_POINTERS" ] 752} 753if (v8_enable_sandboxed_external_pointers) { 754 enabled_external_v8_defines += [ "V8_SANDBOXED_EXTERNAL_POINTERS" ] 755} 756if (v8_deprecation_warnings) { 757 enabled_external_v8_defines += [ "V8_DEPRECATION_WARNINGS" ] 758} 759if (v8_imminent_deprecation_warnings) { 760 enabled_external_v8_defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] 761} 762if (v8_use_perfetto) { 763 enabled_external_v8_defines += [ "V8_USE_PERFETTO" ] 764} 765if (v8_enable_map_packing) { 766 enabled_external_v8_defines += [ "V8_MAP_PACKING" ] 767} 768if (is_tsan) { 769 enabled_external_v8_defines += [ "V8_IS_TSAN" ] 770} 771 772disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines 773 774# Put defines that are used in public headers here; public headers are 775# defined in "v8_headers" and are included by embedders of V8. 776config("v8_header_features") { 777 visibility = [ ":*" ] 778 779 if (v8_generate_external_defines_header) { 780 defines = [ "V8_GN_HEADER" ] 781 } else { 782 defines = enabled_external_v8_defines 783 } 784} 785 786# List of defines that can appear in externally visible cppgc header files and 787# that are controlled by args.gn. 788external_cppgc_defines = [ 789 "CPPGC_SUPPORTS_OBJECT_NAMES", 790 "CPPGC_CAGED_HEAP", 791 "CPPGC_YOUNG_GENERATION", 792] 793 794enabled_external_cppgc_defines = [] 795 796if (cppgc_enable_object_names) { 797 enabled_external_cppgc_defines += [ "CPPGC_SUPPORTS_OBJECT_NAMES" ] 798} 799if (cppgc_enable_caged_heap) { 800 enabled_external_cppgc_defines += [ "CPPGC_CAGED_HEAP" ] 801} 802if (cppgc_enable_young_generation) { 803 enabled_external_cppgc_defines += [ "CPPGC_YOUNG_GENERATION" ] 804} 805 806disabled_external_cppgc_defines = 807 external_cppgc_defines - enabled_external_cppgc_defines 808 809config("cppgc_header_features") { 810 visibility = [ ":*" ] 811 812 if (v8_generate_external_defines_header) { 813 defines = [ "V8_GN_HEADER" ] 814 } else { 815 defines = enabled_external_cppgc_defines 816 } 817} 818 819enabled_external_defines = 820 enabled_external_v8_defines + enabled_external_cppgc_defines 821disabled_external_defines = 822 disabled_external_v8_defines + disabled_external_cppgc_defines 823 824# Put defines here that are only used in our internal files and NEVER in 825# external headers that embedders (such as chromium and node) might include. 826config("features") { 827 # Only targets in this file and its subdirs can depend on this. 828 visibility = [ "./*" ] 829 830 defines = [] 831 832 configs = [ 833 ":v8_header_features", 834 ":cppgc_header_features", 835 ] 836 837 if (cppgc_enable_verify_heap) { 838 defines += [ "CPPGC_VERIFY_HEAP" ] 839 } 840 841 if (cppgc_allow_allocations_in_prefinalizers) { 842 defines += [ "CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS" ] 843 } 844 845 if (v8_embedder_string != "") { 846 defines += [ "V8_EMBEDDER_STRING=\"$v8_embedder_string\"" ] 847 } 848 if (v8_enable_disassembler) { 849 defines += [ "ENABLE_DISASSEMBLER" ] 850 } 851 if (v8_promise_internal_field_count != 0) { 852 defines += 853 [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] 854 } 855 defines += 856 [ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ] 857 858 if (v8_enable_future) { 859 defines += [ "V8_ENABLE_FUTURE" ] 860 } 861 if (v8_enable_lite_mode) { 862 defines += [ "V8_LITE_MODE" ] 863 } 864 if (v8_enable_gdbjit) { 865 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] 866 } 867 if (v8_enable_vtunejit) { 868 defines += [ "ENABLE_VTUNE_JIT_INTERFACE" ] 869 } 870 if (v8_enable_vtunetracemark) { 871 defines += [ "ENABLE_VTUNE_TRACEMARK" ] 872 } 873 if (v8_enable_hugepage) { 874 defines += [ "ENABLE_HUGEPAGE" ] 875 } 876 if (v8_enable_private_mapping_fork_optimization) { 877 defines += [ "V8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION" ] 878 } 879 if (v8_enable_object_print) { 880 defines += [ "OBJECT_PRINT" ] 881 } 882 if (v8_enable_verify_heap) { 883 defines += [ "VERIFY_HEAP" ] 884 } 885 if (v8_enable_verify_predictable) { 886 defines += [ "VERIFY_PREDICTABLE" ] 887 } 888 if (v8_enable_trace_maps) { 889 defines += [ "V8_TRACE_MAPS" ] 890 } 891 if (v8_enable_trace_unoptimized) { 892 defines += [ "V8_TRACE_UNOPTIMIZED" ] 893 } 894 if (v8_enable_trace_feedback_updates) { 895 defines += [ "V8_TRACE_FEEDBACK_UPDATES" ] 896 } 897 if (v8_enable_test_features) { 898 defines += [ "V8_ENABLE_ALLOCATION_TIMEOUT" ] 899 defines += [ "V8_ENABLE_FORCE_SLOW_PATH" ] 900 defines += [ "V8_ENABLE_DOUBLE_CONST_STORE_CHECK" ] 901 } 902 if (v8_enable_i18n_support) { 903 defines += [ "V8_INTL_SUPPORT" ] 904 } 905 if (v8_enable_handle_zapping) { 906 defines += [ "ENABLE_HANDLE_ZAPPING" ] 907 } 908 if (v8_code_comments == true) { 909 defines += [ "V8_CODE_COMMENTS" ] 910 } 911 if (v8_enable_debug_code) { 912 defines += [ "V8_ENABLE_DEBUG_CODE" ] 913 } 914 if (v8_enable_heap_snapshot_verify) { 915 defines += [ "V8_ENABLE_HEAP_SNAPSHOT_VERIFY" ] 916 } 917 if (v8_enable_snapshot_native_code_counters) { 918 defines += [ "V8_SNAPSHOT_NATIVE_CODE_COUNTERS" ] 919 } 920 if (v8_enable_single_generation) { 921 defines += [ "V8_ENABLE_SINGLE_GENERATION" ] 922 } 923 if (v8_enable_conservative_stack_scanning) { 924 defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ] 925 } 926 if (v8_disable_write_barriers) { 927 defines += [ "V8_DISABLE_WRITE_BARRIERS" ] 928 } 929 if (v8_enable_third_party_heap) { 930 defines += [ "V8_ENABLE_THIRD_PARTY_HEAP" ] 931 } 932 if (v8_use_external_startup_data) { 933 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 934 } 935 if (v8_enable_atomic_object_field_writes) { 936 defines += [ "V8_ATOMIC_OBJECT_FIELD_WRITES" ] 937 } 938 if (v8_enable_ignition_dispatch_counting) { 939 defines += [ "V8_IGNITION_DISPATCH_COUNTING" ] 940 } 941 if (v8_enable_lazy_source_positions) { 942 defines += [ "V8_ENABLE_LAZY_SOURCE_POSITIONS" ] 943 } 944 if (v8_use_siphash) { 945 defines += [ "V8_USE_SIPHASH" ] 946 } 947 if (v8_enable_shared_ro_heap) { 948 defines += [ "V8_SHARED_RO_HEAP" ] 949 } 950 if (v8_win64_unwinding_info) { 951 defines += [ "V8_WIN64_UNWINDING_INFO" ] 952 } 953 if (v8_enable_regexp_interpreter_threaded_dispatch) { 954 defines += [ "V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH" ] 955 } 956 if (v8_enable_snapshot_compression) { 957 defines += [ "V8_SNAPSHOT_COMPRESSION" ] 958 } 959 if (v8_control_flow_integrity) { 960 defines += [ "V8_ENABLE_CONTROL_FLOW_INTEGRITY" ] 961 } 962 if (v8_enable_cet_shadow_stack) { 963 defines += [ "V8_ENABLE_CET_SHADOW_STACK" ] 964 } 965 if (v8_enable_wasm_gdb_remote_debugging) { 966 defines += [ "V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING" ] 967 } 968 if (v8_enable_precise_zone_stats) { 969 defines += [ "V8_ENABLE_PRECISE_ZONE_STATS" ] 970 } 971 if (v8_fuzzilli) { 972 defines += [ "V8_FUZZILLI" ] 973 } 974 if (v8_enable_short_builtin_calls) { 975 defines += [ "V8_SHORT_BUILTIN_CALLS" ] 976 } 977 if (v8_enable_external_code_space) { 978 defines += [ "V8_EXTERNAL_CODE_SPACE" ] 979 } 980 if (v8_enable_maglev) { 981 defines += [ "V8_ENABLE_MAGLEV" ] 982 } 983 if (v8_enable_swiss_name_dictionary) { 984 defines += [ "V8_ENABLE_SWISS_NAME_DICTIONARY" ] 985 } 986 if (v8_enable_system_instrumentation) { 987 defines += [ "V8_ENABLE_SYSTEM_INSTRUMENTATION" ] 988 } 989 if (v8_etw_guid != "") { 990 defines += [ "V8_ETW_GUID=\"$v8_etw_guid\"" ] 991 } 992 if (v8_enable_webassembly) { 993 defines += [ "V8_ENABLE_WEBASSEMBLY" ] 994 } 995 if (v8_dict_property_const_tracking) { 996 defines += [ "V8_DICT_PROPERTY_CONST_TRACKING" ] 997 } 998 if (v8_enable_javascript_promise_hooks) { 999 defines += [ "V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS" ] 1000 } 1001 if (v8_enable_allocation_folding) { 1002 defines += [ "V8_ALLOCATION_FOLDING" ] 1003 } 1004 if (v8_allocation_site_tracking) { 1005 defines += [ "V8_ALLOCATION_SITE_TRACKING" ] 1006 } 1007 if (v8_scriptormodule_legacy_lifetime) { 1008 defines += [ "V8_SCRIPTORMODULE_LEGACY_LIFETIME" ] 1009 } 1010 if (v8_advanced_bigint_algorithms) { 1011 defines += [ "V8_ADVANCED_BIGINT_ALGORITHMS" ] 1012 } 1013 if (v8_fuchsia_use_vmex_resource) { 1014 defines += [ "V8_USE_VMEX_RESOURCE" ] 1015 } 1016} 1017 1018config("toolchain") { 1019 # Only targets in this file and its subdirs can depend on this. 1020 visibility = [ "./*" ] 1021 1022 defines = [] 1023 cflags = [] 1024 ldflags = [] 1025 1026 if (v8_current_cpu == "arm") { 1027 defines += [ "V8_TARGET_ARCH_ARM" ] 1028 if (arm_version >= 7) { 1029 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] 1030 } 1031 if (arm_fpu == "vfpv3-d16") { 1032 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] 1033 } else if (arm_fpu == "vfpv3") { 1034 defines += [ 1035 "CAN_USE_VFP3_INSTRUCTIONS", 1036 "CAN_USE_VFP32DREGS", 1037 ] 1038 } else if (arm_fpu == "neon") { 1039 defines += [ 1040 "CAN_USE_VFP3_INSTRUCTIONS", 1041 "CAN_USE_VFP32DREGS", 1042 "CAN_USE_NEON", 1043 ] 1044 } 1045 1046 # TODO(infra): Add support for arm_test_noprobe. 1047 1048 if (current_cpu != "arm") { 1049 # These defines ares used for the ARM simulator. 1050 if (arm_float_abi == "hard") { 1051 defines += [ "USE_EABI_HARDFLOAT=1" ] 1052 } else if (arm_float_abi == "softfp") { 1053 defines += [ "USE_EABI_HARDFLOAT=0" ] 1054 } 1055 } 1056 } 1057 if (v8_current_cpu == "arm64") { 1058 defines += [ "V8_TARGET_ARCH_ARM64" ] 1059 if (current_cpu == "arm64") { 1060 # This will enable PAC+BTI in code generation and static code. 1061 if (v8_control_flow_integrity && 1062 (!build_with_chromium || arm_control_flow_integrity == "standard")) { 1063 cflags += [ "-mbranch-protection=standard" ] 1064 asmflags = [ "-mmark-bti-property" ] 1065 } else if (build_with_chromium && arm_control_flow_integrity == "pac") { 1066 # This should enable PAC only in C++ code (and no CFI in runtime 1067 # generated code). For details, see crbug.com/919548. 1068 cflags += [ "-mbranch-protection=pac-ret" ] 1069 asmflags = [ "-mbranch-protection=pac-ret" ] 1070 } 1071 } 1072 } 1073 1074 # Mips64el/mipsel simulators. 1075 if (target_is_simulator && 1076 (v8_current_cpu == "mipsel" || v8_current_cpu == "mips64el")) { 1077 defines += [ "_MIPS_TARGET_SIMULATOR" ] 1078 } 1079 1080 if (v8_current_cpu == "mipsel" || v8_current_cpu == "mips") { 1081 defines += [ "V8_TARGET_ARCH_MIPS" ] 1082 if (v8_can_use_fpu_instructions) { 1083 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] 1084 } 1085 if (v8_use_mips_abi_hardfloat) { 1086 defines += [ 1087 "__mips_hard_float=1", 1088 "CAN_USE_FPU_INSTRUCTIONS", 1089 ] 1090 } else { 1091 defines += [ "__mips_soft_float=1" ] 1092 } 1093 if (mips_arch_variant == "r6") { 1094 defines += [ 1095 "_MIPS_ARCH_MIPS32R6", 1096 "FPU_MODE_FP64", 1097 ] 1098 if (mips_use_msa) { 1099 defines += [ "_MIPS_MSA" ] 1100 } 1101 } else if (mips_arch_variant == "r2") { 1102 defines += [ "_MIPS_ARCH_MIPS32R2" ] 1103 if (mips_fpu_mode == "fp64") { 1104 defines += [ "FPU_MODE_FP64" ] 1105 } else if (mips_fpu_mode == "fpxx") { 1106 defines += [ "FPU_MODE_FPXX" ] 1107 } else if (mips_fpu_mode == "fp32") { 1108 defines += [ "FPU_MODE_FP32" ] 1109 } 1110 } else if (mips_arch_variant == "r1") { 1111 defines += [ "FPU_MODE_FP32" ] 1112 } 1113 1114 # TODO(infra): Add support for mips_arch_variant rx and loongson. 1115 } 1116 1117 if (v8_current_cpu == "mips64el" || v8_current_cpu == "mips64") { 1118 defines += [ "V8_TARGET_ARCH_MIPS64" ] 1119 if (v8_can_use_fpu_instructions) { 1120 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] 1121 } 1122 if (mips_use_msa) { 1123 defines += [ "_MIPS_MSA" ] 1124 } 1125 if (host_byteorder == "little") { 1126 defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] 1127 } else if (host_byteorder == "big") { 1128 defines += [ "V8_TARGET_ARCH_MIPS64_BE" ] 1129 } 1130 if (v8_use_mips_abi_hardfloat) { 1131 defines += [ 1132 "__mips_hard_float=1", 1133 "CAN_USE_FPU_INSTRUCTIONS", 1134 ] 1135 } else { 1136 defines += [ "__mips_soft_float=1" ] 1137 } 1138 if (mips_arch_variant == "r6") { 1139 defines += [ "_MIPS_ARCH_MIPS64R6" ] 1140 } else if (mips_arch_variant == "r2") { 1141 defines += [ "_MIPS_ARCH_MIPS64R2" ] 1142 } 1143 } 1144 1145 # loong64 simulators. 1146 if (target_is_simulator && v8_current_cpu == "loong64") { 1147 defines += [ "_LOONG64_TARGET_SIMULATOR" ] 1148 } 1149 if (v8_current_cpu == "loong64") { 1150 defines += [ "V8_TARGET_ARCH_LOONG64" ] 1151 } 1152 1153 if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 1154 defines += [ "V8_TARGET_ARCH_S390" ] 1155 cflags += [ "-ffp-contract=off" ] 1156 if (v8_current_cpu == "s390x") { 1157 defines += [ "V8_TARGET_ARCH_S390X" ] 1158 } 1159 if (host_byteorder == "little") { 1160 defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] 1161 } else { 1162 cflags += [ "-march=z196" ] 1163 } 1164 } 1165 if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { 1166 if (v8_current_cpu == "ppc") { 1167 defines += [ "V8_TARGET_ARCH_PPC" ] 1168 } else if (v8_current_cpu == "ppc64") { 1169 defines += [ "V8_TARGET_ARCH_PPC64" ] 1170 cflags += [ "-ffp-contract=off" ] 1171 } 1172 if (host_byteorder == "little") { 1173 defines += [ "V8_TARGET_ARCH_PPC_LE" ] 1174 } else if (host_byteorder == "big") { 1175 defines += [ "V8_TARGET_ARCH_PPC_BE" ] 1176 if (current_os == "aix") { 1177 cflags += [ 1178 # Work around AIX ceil, trunc and round oddities. 1179 "-mcpu=power5+", 1180 "-mfprnd", 1181 1182 # Work around AIX assembler popcntb bug. 1183 "-mno-popcntb", 1184 ] 1185 } 1186 } 1187 } 1188 1189 # Under simulator build, compiler will not provide __riscv_xlen. Define here 1190 if (v8_current_cpu == "riscv64") { 1191 defines += [ "V8_TARGET_ARCH_RISCV64" ] 1192 defines += [ "__riscv_xlen=64" ] 1193 1194 #FIXME: Temporarily use MIPS macro for the building. 1195 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] 1196 if (target_is_simulator) { 1197 defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] 1198 } 1199 } 1200 1201 if (v8_current_cpu == "x86") { 1202 defines += [ "V8_TARGET_ARCH_IA32" ] 1203 if (is_win) { 1204 # Ensure no surprising artifacts from 80bit double math with x86. 1205 cflags += [ "/arch:SSE2" ] 1206 } 1207 } 1208 if (v8_current_cpu == "x64") { 1209 defines += [ "V8_TARGET_ARCH_X64" ] 1210 if (is_win) { 1211 # Increase the initial stack size. The default is 1MB, this is 2MB. This 1212 # applies only to executables and shared libraries produced by V8 since 1213 # ldflags are not pushed to dependants. 1214 ldflags += [ "/STACK:2097152" ] 1215 } 1216 } 1217 if (is_android && v8_android_log_stdout) { 1218 defines += [ "V8_ANDROID_LOG_STDOUT" ] 1219 } 1220 1221 # V8_TARGET_OS_ defines. The target OS may differ from host OS e.g. in 1222 # mksnapshot. We additionally set V8_HAVE_TARGET_OS to determine that a 1223 # target OS has in fact been set; otherwise we internally assume that target 1224 # OS == host OS (see v8config.h). 1225 if (target_os == "android") { 1226 defines += [ "V8_HAVE_TARGET_OS" ] 1227 defines += [ "V8_TARGET_OS_ANDROID" ] 1228 } else if (target_os == "fuchsia") { 1229 defines += [ "V8_HAVE_TARGET_OS" ] 1230 defines += [ "V8_TARGET_OS_FUCHSIA" ] 1231 } else if (target_os == "ios") { 1232 defines += [ "V8_HAVE_TARGET_OS" ] 1233 defines += [ "V8_TARGET_OS_IOS" ] 1234 } else if (target_os == "linux") { 1235 defines += [ "V8_HAVE_TARGET_OS" ] 1236 defines += [ "V8_TARGET_OS_LINUX" ] 1237 } else if (target_os == "mac") { 1238 defines += [ "V8_HAVE_TARGET_OS" ] 1239 defines += [ "V8_TARGET_OS_MACOS" ] 1240 } else if (target_os == "win") { 1241 defines += [ "V8_HAVE_TARGET_OS" ] 1242 defines += [ "V8_TARGET_OS_WIN" ] 1243 } 1244 1245 # TODO(infra): Support v8_enable_prof on Windows. 1246 # TODO(infra): Add support for compiling with simulators. 1247 1248 if (v8_enable_debugging_features) { 1249 if ((is_linux || is_chromeos) && v8_enable_backtrace) { 1250 ldflags += [ "-rdynamic" ] 1251 } 1252 1253 defines += [ "DEBUG" ] 1254 if (v8_enable_slow_dchecks) { 1255 defines += [ "ENABLE_SLOW_DCHECKS" ] 1256 } 1257 } else if (dcheck_always_on) { 1258 defines += [ "DEBUG" ] 1259 } 1260 1261 if (v8_enable_verify_csa) { 1262 defines += [ "ENABLE_VERIFY_CSA" ] 1263 } 1264 1265 if (v8_enable_runtime_call_stats) { 1266 defines += [ "V8_RUNTIME_CALL_STATS" ] 1267 } 1268 1269 if (v8_no_inline) { 1270 if (is_win) { 1271 cflags += [ "/Ob0" ] 1272 } else { 1273 cflags += [ 1274 "-fno-inline-functions", 1275 "-fno-inline", 1276 ] 1277 } 1278 } 1279 1280 if (is_clang) { 1281 cflags += [ 1282 "-Wmissing-field-initializers", 1283 1284 # TODO(v8:12245): Fix shadowing instances and remove. 1285 "-Wno-shadow", 1286 ] 1287 1288 if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { 1289 # We exclude MIPS because the IsMipsArchVariant macro causes trouble. 1290 cflags += [ "-Wunreachable-code" ] 1291 } 1292 1293 if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || 1294 v8_current_cpu == "mips64el" || v8_current_cpu == "riscv64") { 1295 cflags += [ "-Wshorten-64-to-32" ] 1296 } 1297 } 1298 1299 if (is_win) { 1300 cflags += [ 1301 "/wd4245", # Conversion with signed/unsigned mismatch. 1302 "/wd4267", # Conversion with possible loss of data. 1303 "/wd4324", # Padding structure due to alignment. 1304 "/wd4701", # Potentially uninitialized local variable. 1305 "/wd4702", # Unreachable code. 1306 "/wd4703", # Potentially uninitialized local pointer variable. 1307 "/wd4709", # Comma operator within array index expr (bugged). 1308 "/wd4714", # Function marked forceinline not inlined. 1309 1310 # MSVC assumes that control can get past an exhaustive switch and then 1311 # warns if there's no return there (see https://crbug.com/v8/7658) 1312 "/wd4715", # Not all control paths return a value. 1313 1314 "/wd4718", # Recursive call has no side-effect. 1315 "/wd4723", # https://crbug.com/v8/7771 1316 "/wd4724", # https://crbug.com/v8/7771 1317 "/wd4800", # Forcing value to bool. 1318 ] 1319 } 1320 1321 if (!is_clang && is_win) { 1322 cflags += [ 1323 "/wd4506", # Benign "no definition for inline function" 1324 1325 # Warnings permanently disabled: 1326 1327 # C4091: 'typedef ': ignored on left of 'X' when no variable is 1328 # declared. 1329 # This happens in a number of Windows headers. Dumb. 1330 "/wd4091", 1331 1332 # C4127: conditional expression is constant 1333 # This warning can in theory catch dead code and other problems, but 1334 # triggers in far too many desirable cases where the conditional 1335 # expression is either set by macros or corresponds some legitimate 1336 # compile-time constant expression (due to constant template args, 1337 # conditionals comparing the sizes of different types, etc.). Some of 1338 # these can be worked around, but it's not worth it. 1339 "/wd4127", 1340 1341 # C4251: 'identifier' : class 'type' needs to have dll-interface to be 1342 # used by clients of class 'type2' 1343 # This is necessary for the shared library build. 1344 "/wd4251", 1345 1346 # C4275: non dll-interface class used as base for dll-interface class 1347 # This points out a potential (but rare) problem with referencing static 1348 # fields of a non-exported base, through the base's non-exported inline 1349 # functions, or directly. The warning is subtle enough that people just 1350 # suppressed it when they saw it, so it's not worth it. 1351 "/wd4275", 1352 1353 # C4312 is a VS 2015 64-bit warning for integer to larger pointer. 1354 # TODO(brucedawson): fix warnings, crbug.com/554200 1355 "/wd4312", 1356 1357 # C4324 warns when padding is added to fulfill alignas requirements, 1358 # but can trigger in benign cases that are difficult to individually 1359 # suppress. 1360 "/wd4324", 1361 1362 # C4351: new behavior: elements of array 'array' will be default 1363 # initialized 1364 # This is a silly "warning" that basically just alerts you that the 1365 # compiler is going to actually follow the language spec like it's 1366 # supposed to, instead of not following it like old buggy versions did. 1367 # There's absolutely no reason to turn this on. 1368 "/wd4351", 1369 1370 # C4355: 'this': used in base member initializer list 1371 # It's commonly useful to pass |this| to objects in a class' initializer 1372 # list. While this warning can catch real bugs, most of the time the 1373 # constructors in question don't attempt to call methods on the passed-in 1374 # pointer (until later), and annotating every legit usage of this is 1375 # simply more hassle than the warning is worth. 1376 "/wd4355", 1377 1378 # C4503: 'identifier': decorated name length exceeded, name was 1379 # truncated 1380 # This only means that some long error messages might have truncated 1381 # identifiers in the presence of lots of templates. It has no effect on 1382 # program correctness and there's no real reason to waste time trying to 1383 # prevent it. 1384 "/wd4503", 1385 1386 # Warning C4589 says: "Constructor of abstract class ignores 1387 # initializer for virtual base class." Disable this warning because it 1388 # is flaky in VS 2015 RTM. It triggers on compiler generated 1389 # copy-constructors in some cases. 1390 "/wd4589", 1391 1392 # C4611: interaction between 'function' and C++ object destruction is 1393 # non-portable 1394 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN 1395 # suggests using exceptions instead of setjmp/longjmp for C++, but 1396 # Chromium code compiles without exception support. We therefore have to 1397 # use setjmp/longjmp for e.g. JPEG decode error handling, which means we 1398 # have to turn off this warning (and be careful about how object 1399 # destruction happens in such cases). 1400 "/wd4611", 1401 1402 # Warnings to evaluate and possibly fix/reenable later: 1403 1404 "/wd4100", # Unreferenced formal function parameter. 1405 "/wd4121", # Alignment of a member was sensitive to packing. 1406 "/wd4244", # Conversion: possible loss of data. 1407 "/wd4505", # Unreferenced local function has been removed. 1408 "/wd4510", # Default constructor could not be generated. 1409 "/wd4512", # Assignment operator could not be generated. 1410 "/wd4610", # Class can never be instantiated, constructor required. 1411 "/wd4838", # Narrowing conversion. Doesn't seem to be very useful. 1412 "/wd4995", # 'X': name was marked as #pragma deprecated 1413 "/wd4996", # Deprecated function warning. 1414 1415 # These are variable shadowing warnings that are new in VS2015. We 1416 # should work through these at some point -- they may be removed from 1417 # the RTM release in the /W4 set. 1418 "/wd4456", 1419 "/wd4457", 1420 "/wd4458", 1421 "/wd4459", 1422 1423 # All of our compilers support the extensions below. 1424 "/wd4200", # nonstandard extension used: zero-sized array in struct/union 1425 "/wd4201", # nonstandard extension used: nameless struct/union 1426 "/wd4204", # nonstandard extension used : non-constant aggregate 1427 # initializer 1428 1429 "/wd4221", # nonstandard extension used : 'identifier' : cannot be 1430 # initialized using address of automatic variable 1431 1432 # http://crbug.com/588506 - Conversion suppressions waiting on Clang 1433 # -Wconversion. 1434 "/wd4245", # 'conversion' : conversion from 'type1' to 'type2', 1435 # signed/unsigned mismatch 1436 1437 "/wd4267", # 'var' : conversion from 'size_t' to 'type', possible loss of 1438 # data 1439 1440 "/wd4305", # 'identifier' : truncation from 'type1' to 'type2' 1441 "/wd4389", # 'operator' : signed/unsigned mismatch 1442 1443 "/wd4702", # unreachable code 1444 1445 # http://crbug.com/848979 - MSVC is more conservative than Clang with 1446 # regards to variables initialized and consumed in different branches. 1447 "/wd4701", # Potentially uninitialized local variable 'name' used 1448 "/wd4703", # Potentially uninitialized local pointer variable 'name' used 1449 1450 # http://crbug.com/848979 - Remaining Clang permitted warnings. 1451 "/wd4661", # 'identifier' : no suitable definition provided for explicit 1452 # template instantiation request 1453 1454 "/wd4706", # assignment within conditional expression 1455 # MSVC is stricter and requires a boolean expression. 1456 1457 "/wd4715", # 'function' : not all control paths return a value' 1458 # MSVC does not analyze switch (enum) for completeness. 1459 ] 1460 } 1461 1462 if (!is_clang && !is_win) { 1463 cflags += [ 1464 # Disable gcc warnings for optimizations based on the assumption that 1465 # signed overflow does not occur. Generates false positives (see 1466 # http://crbug.com/v8/6341). 1467 "-Wno-strict-overflow", 1468 1469 # GCC assumes that control can get past an exhaustive switch and then 1470 # warns if there's no return there (see https://crbug.com/v8/7658). 1471 "-Wno-return-type", 1472 1473 # Disable gcc warnings for using enum constant in boolean context. 1474 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266 1475 "-Wno-int-in-bool-context", 1476 ] 1477 } 1478 1479 # Chromium uses a hand-picked subset of UBSan coverage. We want everything. 1480 if (is_ubsan) { 1481 cflags += [ "-fsanitize=undefined" ] 1482 } 1483} 1484 1485# For code that is hot during mksnapshot. In fast-mksnapshot builds, we 1486# optimize some files even in debug builds to speed up mksnapshot times. 1487config("always_optimize") { 1488 configs = [ ":internal_config" ] 1489 1490 # TODO(crbug.com/621335) Rework this so that we don't have the confusion 1491 # between "optimize_speed" and "optimize_max". 1492 if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { 1493 configs += [ "//build/config/compiler:optimize_speed" ] 1494 } else { 1495 configs += [ "//build/config/compiler:optimize_max" ] 1496 } 1497} 1498 1499# Configs for code coverage with gcov. Separate configs for cflags and ldflags 1500# to selectively influde cflags in non-test targets only. 1501config("v8_gcov_coverage_cflags") { 1502 cflags = [ 1503 "-fprofile-arcs", 1504 "-ftest-coverage", 1505 ] 1506} 1507 1508config("v8_gcov_coverage_ldflags") { 1509 ldflags = [ "-fprofile-arcs" ] 1510} 1511 1512############################################################################### 1513# Actions 1514# 1515 1516# Only for Windows clang builds. Converts the embedded.S file produced by 1517# mksnapshot into an embedded.cc file with corresponding inline assembly. 1518template("asm_to_inline_asm") { 1519 name = target_name 1520 if (name == "default") { 1521 suffix = "" 1522 } else { 1523 suffix = "_$name" 1524 } 1525 1526 action("asm_to_inline_asm_" + name) { 1527 visibility = [ ":*" ] # Only targets in this file can depend on this. 1528 1529 assert(emit_builtins_as_inline_asm) 1530 1531 script = "tools/snapshot/asm_to_inline_asm.py" 1532 deps = [ ":run_mksnapshot_" + name ] 1533 sources = [ "$target_gen_dir/embedded${suffix}.S" ] 1534 outputs = [ "$target_gen_dir/embedded${suffix}.cc" ] 1535 args = invoker.args 1536 args += [ 1537 rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir), 1538 rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir), 1539 ] 1540 } 1541} 1542 1543if (is_android && enable_java_templates) { 1544 android_assets("v8_external_startup_data_assets") { 1545 if (v8_use_external_startup_data) { 1546 deps = [ "//v8" ] 1547 renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ] 1548 if (current_cpu == "arm" || current_cpu == "x86" || 1549 current_cpu == "mipsel") { 1550 renaming_destinations = [ "snapshot_blob_32.bin" ] 1551 } else { 1552 renaming_destinations = [ "snapshot_blob_64.bin" ] 1553 } 1554 disable_compression = true 1555 } 1556 } 1557} 1558 1559action("postmortem-metadata") { 1560 # Only targets in this file and the top-level visibility target can 1561 # depend on this. 1562 visibility = [ 1563 ":*", 1564 "//:gn_visibility", 1565 ] 1566 1567 script = "tools/gen-postmortem-metadata.py" 1568 1569 # NOSORT 1570 sources = [ 1571 "$target_gen_dir/torque-generated/instance-types.h", 1572 "src/objects/allocation-site.h", 1573 "src/objects/allocation-site-inl.h", 1574 "src/objects/cell.h", 1575 "src/objects/cell-inl.h", 1576 "src/objects/code.h", 1577 "src/objects/code-inl.h", 1578 "src/objects/data-handler.h", 1579 "src/objects/data-handler-inl.h", 1580 "src/objects/descriptor-array.h", 1581 "src/objects/descriptor-array-inl.h", 1582 "src/objects/feedback-cell.h", 1583 "src/objects/feedback-cell-inl.h", 1584 "src/objects/fixed-array.h", 1585 "src/objects/fixed-array-inl.h", 1586 "src/objects/heap-number.h", 1587 "src/objects/heap-number-inl.h", 1588 "src/objects/heap-object.h", 1589 "src/objects/heap-object-inl.h", 1590 "src/objects/instance-type.h", 1591 "src/objects/js-array-buffer.h", 1592 "src/objects/js-array-buffer-inl.h", 1593 "src/objects/js-array.h", 1594 "src/objects/js-array-inl.h", 1595 "src/objects/js-function-inl.h", 1596 "src/objects/js-function.cc", 1597 "src/objects/js-function.h", 1598 "src/objects/js-objects.cc", 1599 "src/objects/js-objects.h", 1600 "src/objects/js-objects-inl.h", 1601 "src/objects/js-promise.h", 1602 "src/objects/js-promise-inl.h", 1603 "src/objects/js-regexp.cc", 1604 "src/objects/js-regexp.h", 1605 "src/objects/js-regexp-inl.h", 1606 "src/objects/js-regexp-string-iterator.h", 1607 "src/objects/js-regexp-string-iterator-inl.h", 1608 "src/objects/map.cc", 1609 "src/objects/map.h", 1610 "src/objects/map-inl.h", 1611 "src/objects/megadom-handler.h", 1612 "src/objects/megadom-handler-inl.h", 1613 "src/objects/name.h", 1614 "src/objects/name-inl.h", 1615 "src/objects/objects.h", 1616 "src/objects/objects-inl.h", 1617 "src/objects/oddball.h", 1618 "src/objects/oddball-inl.h", 1619 "src/objects/primitive-heap-object.h", 1620 "src/objects/primitive-heap-object-inl.h", 1621 "src/objects/scope-info.h", 1622 "src/objects/scope-info-inl.h", 1623 "src/objects/script.h", 1624 "src/objects/script-inl.h", 1625 "src/objects/shared-function-info.cc", 1626 "src/objects/shared-function-info.h", 1627 "src/objects/shared-function-info-inl.h", 1628 "src/objects/string.cc", 1629 "src/objects/string-comparator.cc", 1630 "src/objects/string-comparator.h", 1631 "src/objects/string.h", 1632 "src/objects/string-inl.h", 1633 "src/objects/struct.h", 1634 "src/objects/struct-inl.h", 1635 ] 1636 1637 outputs = [ "$target_gen_dir/debug-support.cc" ] 1638 1639 args = rebase_path(outputs, root_build_dir) + 1640 rebase_path(sources, root_build_dir) 1641 1642 deps = [ ":run_torque" ] 1643} 1644 1645torque_files = [ 1646 "src/builtins/aggregate-error.tq", 1647 "src/builtins/array-at.tq", 1648 "src/builtins/array-concat.tq", 1649 "src/builtins/array-copywithin.tq", 1650 "src/builtins/array-every.tq", 1651 "src/builtins/array-filter.tq", 1652 "src/builtins/array-find.tq", 1653 "src/builtins/array-findindex.tq", 1654 "src/builtins/array-findlast.tq", 1655 "src/builtins/array-findlastindex.tq", 1656 "src/builtins/array-foreach.tq", 1657 "src/builtins/array-from.tq", 1658 "src/builtins/array-isarray.tq", 1659 "src/builtins/array-join.tq", 1660 "src/builtins/array-lastindexof.tq", 1661 "src/builtins/array-map.tq", 1662 "src/builtins/array-of.tq", 1663 "src/builtins/array-reduce-right.tq", 1664 "src/builtins/array-reduce.tq", 1665 "src/builtins/array-reverse.tq", 1666 "src/builtins/array-shift.tq", 1667 "src/builtins/array-slice.tq", 1668 "src/builtins/array-some.tq", 1669 "src/builtins/array-splice.tq", 1670 "src/builtins/array-unshift.tq", 1671 "src/builtins/array.tq", 1672 "src/builtins/arraybuffer.tq", 1673 "src/builtins/base.tq", 1674 "src/builtins/boolean.tq", 1675 "src/builtins/builtins-bigint.tq", 1676 "src/builtins/builtins-string.tq", 1677 "src/builtins/cast.tq", 1678 "src/builtins/collections.tq", 1679 "src/builtins/constructor.tq", 1680 "src/builtins/conversion.tq", 1681 "src/builtins/convert.tq", 1682 "src/builtins/console.tq", 1683 "src/builtins/data-view.tq", 1684 "src/builtins/finalization-registry.tq", 1685 "src/builtins/frames.tq", 1686 "src/builtins/frame-arguments.tq", 1687 "src/builtins/function.tq", 1688 "src/builtins/growable-fixed-array.tq", 1689 "src/builtins/ic-callable.tq", 1690 "src/builtins/ic.tq", 1691 "src/builtins/internal-coverage.tq", 1692 "src/builtins/internal.tq", 1693 "src/builtins/iterator.tq", 1694 "src/builtins/math.tq", 1695 "src/builtins/number.tq", 1696 "src/builtins/object-fromentries.tq", 1697 "src/builtins/object.tq", 1698 "src/builtins/promise-abstract-operations.tq", 1699 "src/builtins/promise-all.tq", 1700 "src/builtins/promise-all-element-closure.tq", 1701 "src/builtins/promise-any.tq", 1702 "src/builtins/promise-constructor.tq", 1703 "src/builtins/promise-finally.tq", 1704 "src/builtins/promise-misc.tq", 1705 "src/builtins/promise-race.tq", 1706 "src/builtins/promise-reaction-job.tq", 1707 "src/builtins/promise-resolve.tq", 1708 "src/builtins/promise-then.tq", 1709 "src/builtins/promise-jobs.tq", 1710 "src/builtins/proxy-constructor.tq", 1711 "src/builtins/proxy-delete-property.tq", 1712 "src/builtins/proxy-get-property.tq", 1713 "src/builtins/proxy-get-prototype-of.tq", 1714 "src/builtins/proxy-has-property.tq", 1715 "src/builtins/proxy-is-extensible.tq", 1716 "src/builtins/proxy-prevent-extensions.tq", 1717 "src/builtins/proxy-revocable.tq", 1718 "src/builtins/proxy-revoke.tq", 1719 "src/builtins/proxy-set-property.tq", 1720 "src/builtins/proxy-set-prototype-of.tq", 1721 "src/builtins/proxy.tq", 1722 "src/builtins/reflect.tq", 1723 "src/builtins/regexp-exec.tq", 1724 "src/builtins/regexp-match-all.tq", 1725 "src/builtins/regexp-match.tq", 1726 "src/builtins/regexp-replace.tq", 1727 "src/builtins/regexp-search.tq", 1728 "src/builtins/regexp-source.tq", 1729 "src/builtins/regexp-split.tq", 1730 "src/builtins/regexp-test.tq", 1731 "src/builtins/regexp.tq", 1732 "src/builtins/string-at.tq", 1733 "src/builtins/string-endswith.tq", 1734 "src/builtins/string-html.tq", 1735 "src/builtins/string-includes.tq", 1736 "src/builtins/string-indexof.tq", 1737 "src/builtins/string-iterator.tq", 1738 "src/builtins/string-match-search.tq", 1739 "src/builtins/string-pad.tq", 1740 "src/builtins/string-repeat.tq", 1741 "src/builtins/string-replaceall.tq", 1742 "src/builtins/string-slice.tq", 1743 "src/builtins/string-startswith.tq", 1744 "src/builtins/string-substr.tq", 1745 "src/builtins/string-substring.tq", 1746 "src/builtins/string-trim.tq", 1747 "src/builtins/symbol.tq", 1748 "src/builtins/torque-internal.tq", 1749 "src/builtins/typed-array-at.tq", 1750 "src/builtins/typed-array-createtypedarray.tq", 1751 "src/builtins/typed-array-every.tq", 1752 "src/builtins/typed-array-entries.tq", 1753 "src/builtins/typed-array-filter.tq", 1754 "src/builtins/typed-array-find.tq", 1755 "src/builtins/typed-array-findindex.tq", 1756 "src/builtins/typed-array-findlast.tq", 1757 "src/builtins/typed-array-findlastindex.tq", 1758 "src/builtins/typed-array-foreach.tq", 1759 "src/builtins/typed-array-from.tq", 1760 "src/builtins/typed-array-keys.tq", 1761 "src/builtins/typed-array-of.tq", 1762 "src/builtins/typed-array-reduce.tq", 1763 "src/builtins/typed-array-reduceright.tq", 1764 "src/builtins/typed-array-set.tq", 1765 "src/builtins/typed-array-slice.tq", 1766 "src/builtins/typed-array-some.tq", 1767 "src/builtins/typed-array-sort.tq", 1768 "src/builtins/typed-array-subarray.tq", 1769 "src/builtins/typed-array-values.tq", 1770 "src/builtins/typed-array.tq", 1771 "src/builtins/weak-ref.tq", 1772 "src/ic/handler-configuration.tq", 1773 "src/objects/allocation-site.tq", 1774 "src/objects/api-callbacks.tq", 1775 "src/objects/arguments.tq", 1776 "src/objects/bigint.tq", 1777 "src/objects/call-site-info.tq", 1778 "src/objects/cell.tq", 1779 "src/objects/code.tq", 1780 "src/objects/contexts.tq", 1781 "src/objects/data-handler.tq", 1782 "src/objects/debug-objects.tq", 1783 "src/objects/descriptor-array.tq", 1784 "src/objects/embedder-data-array.tq", 1785 "src/objects/feedback-cell.tq", 1786 "src/objects/feedback-vector.tq", 1787 "src/objects/fixed-array.tq", 1788 "src/objects/foreign.tq", 1789 "src/objects/free-space.tq", 1790 "src/objects/heap-number.tq", 1791 "src/objects/heap-object.tq", 1792 "src/objects/js-array-buffer.tq", 1793 "src/objects/js-array.tq", 1794 "src/objects/js-collection-iterator.tq", 1795 "src/objects/js-collection.tq", 1796 "src/objects/js-function.tq", 1797 "src/objects/js-generator.tq", 1798 "src/objects/js-objects.tq", 1799 "src/objects/js-promise.tq", 1800 "src/objects/js-proxy.tq", 1801 "src/objects/js-regexp-string-iterator.tq", 1802 "src/objects/js-regexp.tq", 1803 "src/objects/js-shadow-realms.tq", 1804 "src/objects/js-struct.tq", 1805 "src/objects/js-temporal-objects.tq", 1806 "src/objects/js-weak-refs.tq", 1807 "src/objects/literal-objects.tq", 1808 "src/objects/map.tq", 1809 "src/objects/megadom-handler.tq", 1810 "src/objects/microtask.tq", 1811 "src/objects/module.tq", 1812 "src/objects/name.tq", 1813 "src/objects/oddball.tq", 1814 "src/objects/ordered-hash-table.tq", 1815 "src/objects/primitive-heap-object.tq", 1816 "src/objects/promise.tq", 1817 "src/objects/property-array.tq", 1818 "src/objects/property-cell.tq", 1819 "src/objects/property-descriptor-object.tq", 1820 "src/objects/prototype-info.tq", 1821 "src/objects/regexp-match-info.tq", 1822 "src/objects/scope-info.tq", 1823 "src/objects/script.tq", 1824 "src/objects/shared-function-info.tq", 1825 "src/objects/source-text-module.tq", 1826 "src/objects/string.tq", 1827 "src/objects/struct.tq", 1828 "src/objects/swiss-hash-table-helpers.tq", 1829 "src/objects/swiss-name-dictionary.tq", 1830 "src/objects/synthetic-module.tq", 1831 "src/objects/template-objects.tq", 1832 "src/objects/templates.tq", 1833 "src/objects/torque-defined-classes.tq", 1834 "src/objects/turbofan-types.tq", 1835 "test/torque/test-torque.tq", 1836 "third_party/v8/builtins/array-sort.tq", 1837] 1838 1839if (v8_enable_i18n_support) { 1840 torque_files += [ 1841 "src/objects/intl-objects.tq", 1842 "src/objects/js-break-iterator.tq", 1843 "src/objects/js-collator.tq", 1844 "src/objects/js-date-time-format.tq", 1845 "src/objects/js-display-names.tq", 1846 "src/objects/js-list-format.tq", 1847 "src/objects/js-locale.tq", 1848 "src/objects/js-number-format.tq", 1849 "src/objects/js-plural-rules.tq", 1850 "src/objects/js-relative-time-format.tq", 1851 "src/objects/js-segment-iterator.tq", 1852 "src/objects/js-segmenter.tq", 1853 "src/objects/js-segments.tq", 1854 ] 1855} 1856 1857if (v8_enable_webassembly) { 1858 torque_files += [ 1859 "src/builtins/wasm.tq", 1860 "src/debug/debug-wasm-objects.tq", 1861 "src/wasm/wasm-objects.tq", 1862 ] 1863} 1864 1865# Template for running torque 1866# When building with v8_verify_torque_generation_invariance=true we need 1867# to be able to run torque for both 32 and 64 bits in the same build 1868template("run_torque") { 1869 if (target_name == "") { 1870 suffix = "" 1871 } else { 1872 suffix = "_$target_name" 1873 } 1874 1875 toolchain = invoker.toolchain 1876 1877 action("run_torque" + suffix) { 1878 visibility = [ 1879 ":*", 1880 "test/cctest/:*", 1881 "tools/debug_helper/:*", 1882 "tools/gcmole/:*", 1883 ] 1884 1885 deps = [ ":torque($toolchain)" ] 1886 1887 script = "tools/run.py" 1888 1889 sources = torque_files 1890 1891 destination_folder = "$target_gen_dir/torque-generated$suffix" 1892 1893 outputs = [ 1894 "$destination_folder/bit-fields.h", 1895 "$destination_folder/builtin-definitions.h", 1896 "$destination_folder/class-debug-readers.cc", 1897 "$destination_folder/class-debug-readers.h", 1898 "$destination_folder/class-forward-declarations.h", 1899 "$destination_folder/class-verifiers.cc", 1900 "$destination_folder/class-verifiers.h", 1901 "$destination_folder/csa-types.h", 1902 "$destination_folder/debug-macros.cc", 1903 "$destination_folder/debug-macros.h", 1904 "$destination_folder/enum-verifiers.cc", 1905 "$destination_folder/exported-macros-assembler.cc", 1906 "$destination_folder/exported-macros-assembler.h", 1907 "$destination_folder/factory.cc", 1908 "$destination_folder/factory.inc", 1909 "$destination_folder/instance-types.h", 1910 "$destination_folder/interface-descriptors.inc", 1911 "$destination_folder/objects-body-descriptors-inl.inc", 1912 "$destination_folder/objects-printer.cc", 1913 "$destination_folder/visitor-lists.h", 1914 ] 1915 1916 foreach(file, torque_files) { 1917 filetq = string_replace(file, ".tq", "-tq") 1918 outputs += [ 1919 "$destination_folder/$filetq-csa.cc", 1920 "$destination_folder/$filetq-csa.h", 1921 "$destination_folder/$filetq-inl.inc", 1922 "$destination_folder/$filetq.cc", 1923 "$destination_folder/$filetq.inc", 1924 ] 1925 } 1926 1927 args = [ 1928 "./" + rebase_path( 1929 get_label_info(":torque($toolchain)", "root_out_dir") + "/torque", 1930 root_build_dir), 1931 "-o", 1932 rebase_path("$destination_folder", root_build_dir), 1933 "-v8-root", 1934 rebase_path(".", root_build_dir), 1935 ] 1936 if (v8_annotate_torque_ir) { 1937 args += [ "-annotate-ir" ] 1938 } 1939 if (defined(invoker.args)) { 1940 args += invoker.args 1941 } 1942 args += torque_files 1943 } 1944} 1945 1946# Default run_torque action 1947run_torque("") { 1948 toolchain = v8_generator_toolchain 1949} 1950 1951if (v8_verify_torque_generation_invariance) { 1952 run_torque("x86") { 1953 toolchain = "//build/toolchain/linux:clang_x86" 1954 } 1955 1956 run_torque("x64") { 1957 args = [ "-m32" ] 1958 toolchain = "//build/toolchain/linux:clang_x64" 1959 } 1960 1961 action("compare_torque_runs") { 1962 deps = [ 1963 ":run_torque_x64", 1964 ":run_torque_x86", 1965 ] 1966 report_file = "$target_gen_dir/torque_comparison_results.txt" 1967 script = "tools/compare_torque_output.py" 1968 args = [ 1969 rebase_path("$target_gen_dir/torque-generated_x64", root_build_dir), 1970 rebase_path("$target_gen_dir/torque-generated_x86", root_build_dir), 1971 rebase_path(report_file, root_build_dir), 1972 ] 1973 outputs = [ report_file ] 1974 } 1975} 1976 1977group("v8_maybe_icu") { 1978 if (v8_enable_i18n_support) { 1979 public_deps = [ "//third_party/icu" ] 1980 } 1981} 1982 1983v8_header_set("torque_runtime_support") { 1984 visibility = [ ":*" ] 1985 1986 sources = [ "src/torque/runtime-support.h" ] 1987 1988 configs = [ ":internal_config" ] 1989} 1990 1991v8_source_set("torque_generated_initializers") { 1992 visibility = [ ":*" ] # Only targets in this file can depend on this. 1993 1994 deps = [ 1995 ":generate_bytecode_builtins_list", 1996 ":run_torque", 1997 ":v8_base_without_compiler", 1998 ":v8_tracing", 1999 ] 2000 2001 public_deps = [ 2002 ":torque_runtime_support", 2003 ":v8_maybe_icu", 2004 ] 2005 2006 sources = [ 2007 "$target_gen_dir/torque-generated/csa-types.h", 2008 "$target_gen_dir/torque-generated/enum-verifiers.cc", 2009 "$target_gen_dir/torque-generated/exported-macros-assembler.cc", 2010 "$target_gen_dir/torque-generated/exported-macros-assembler.h", 2011 ] 2012 foreach(file, torque_files) { 2013 filetq = string_replace(file, ".tq", "-tq") 2014 sources += [ 2015 "$target_gen_dir/torque-generated/$filetq-csa.cc", 2016 "$target_gen_dir/torque-generated/$filetq-csa.h", 2017 ] 2018 } 2019 2020 configs = [ ":internal_config" ] 2021} 2022 2023v8_source_set("torque_generated_definitions") { 2024 visibility = [ ":*" ] # Only targets in this file can depend on this. 2025 2026 deps = [ 2027 ":generate_bytecode_builtins_list", 2028 ":run_torque", 2029 ":v8_internal_headers", 2030 ":v8_libbase", 2031 ":v8_tracing", 2032 ] 2033 2034 public_deps = [ ":v8_maybe_icu" ] 2035 2036 sources = [ 2037 "$target_gen_dir/torque-generated/class-forward-declarations.h", 2038 "$target_gen_dir/torque-generated/class-verifiers.cc", 2039 "$target_gen_dir/torque-generated/class-verifiers.h", 2040 "$target_gen_dir/torque-generated/factory.cc", 2041 "$target_gen_dir/torque-generated/objects-printer.cc", 2042 ] 2043 foreach(file, torque_files) { 2044 filetq = string_replace(file, ".tq", "-tq") 2045 sources += [ 2046 "$target_gen_dir/torque-generated/$filetq-inl.inc", 2047 "$target_gen_dir/torque-generated/$filetq.cc", 2048 "$target_gen_dir/torque-generated/$filetq.inc", 2049 ] 2050 } 2051 2052 configs = [ ":internal_config" ] 2053} 2054 2055action("generate_bytecode_builtins_list") { 2056 script = "tools/run.py" 2057 outputs = [ "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h" ] 2058 deps = [ ":bytecode_builtins_list_generator($v8_generator_toolchain)" ] 2059 args = [ 2060 "./" + rebase_path( 2061 get_label_info( 2062 ":bytecode_builtins_list_generator($v8_generator_toolchain)", 2063 "root_out_dir") + "/bytecode_builtins_list_generator", 2064 root_build_dir), 2065 rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", 2066 root_build_dir), 2067 ] 2068} 2069 2070# Template to generate different V8 snapshots based on different runtime flags. 2071# Can be invoked with run_mksnapshot(<name>). The target will resolve to 2072# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used. 2073# Otherwise files are suffixed, e.g. embedded_<name>.S and 2074# snapshot_blob_<name>.bin. 2075# 2076# The template exposes the variables: 2077# args: additional flags for mksnapshots 2078# embedded_suffix: a camel case suffix for method names in the embedded 2079# snapshot. 2080template("run_mksnapshot") { 2081 name = target_name 2082 if (name == "default") { 2083 suffix = "" 2084 } else { 2085 suffix = "_$name" 2086 } 2087 action("run_mksnapshot_" + name) { 2088 # Only targets in this file and running mkgrokdump can depend on this. 2089 visibility = [ 2090 ":*", 2091 "tools/debug_helper:run_mkgrokdump", 2092 ] 2093 2094 deps = [ ":mksnapshot($v8_snapshot_toolchain)" ] 2095 2096 script = "tools/run.py" 2097 2098 sources = [] 2099 2100 outputs = [] 2101 2102 data = [] 2103 2104 args = [ 2105 "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", 2106 "root_out_dir") + "/mksnapshot", 2107 root_build_dir), 2108 "--turbo_instruction_scheduling", 2109 2110 # In cross builds, the snapshot may be generated for both the host and 2111 # target toolchains. The same host binary is used to generate both, so 2112 # mksnapshot needs to know which target OS to use at runtime. It's weird, 2113 # but the target OS is really |current_os|. 2114 "--target_os=$current_os", 2115 "--target_arch=$current_cpu", 2116 2117 "--embedded_src", 2118 rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir), 2119 ] 2120 2121 if (v8_enable_builtins_profiling) { 2122 args += [ "--turbo-profiling" ] 2123 } 2124 if (v8_enable_builtins_profiling_verbose) { 2125 args += [ "--turbo-profiling-verbose" ] 2126 } 2127 if (v8_builtins_profiling_log_file != "") { 2128 sources += [ v8_builtins_profiling_log_file ] 2129 args += [ 2130 "--turbo-profiling-log-file", 2131 rebase_path(v8_builtins_profiling_log_file, root_build_dir), 2132 ] 2133 } 2134 2135 # This is needed to distinguish between generating code for the simulator 2136 # and cross-compiling. The latter may need to run code on the host with the 2137 # simulator but cannot use simulator-specific instructions. 2138 if (target_is_simulator) { 2139 args += [ "--target_is_simulator" ] 2140 } 2141 2142 args += invoker.args 2143 2144 outputs += [ "$target_gen_dir/embedded${suffix}.S" ] 2145 if (invoker.embedded_variant != "") { 2146 args += [ 2147 "--embedded_variant", 2148 invoker.embedded_variant, 2149 ] 2150 } 2151 2152 if (v8_random_seed != "0") { 2153 args += [ 2154 "--random-seed", 2155 v8_random_seed, 2156 ] 2157 } 2158 2159 if (v8_os_page_size != "0") { 2160 args += [ 2161 "--v8_os_page_size", 2162 v8_os_page_size, 2163 ] 2164 } 2165 2166 if (v8_use_external_startup_data) { 2167 outputs += [ "$root_out_dir/snapshot_blob${suffix}.bin" ] 2168 data += [ "$root_out_dir/snapshot_blob${suffix}.bin" ] 2169 args += [ 2170 "--startup_blob", 2171 rebase_path("$root_out_dir/snapshot_blob${suffix}.bin", root_build_dir), 2172 ] 2173 } else { 2174 outputs += [ "$target_gen_dir/snapshot${suffix}.cc" ] 2175 args += [ 2176 "--startup_src", 2177 rebase_path("$target_gen_dir/snapshot${suffix}.cc", root_build_dir), 2178 ] 2179 } 2180 2181 if (v8_embed_script != "") { 2182 sources += [ v8_embed_script ] 2183 args += [ rebase_path(v8_embed_script, root_build_dir) ] 2184 } 2185 2186 if (v8_enable_snapshot_code_comments) { 2187 args += [ "--code-comments" ] 2188 } 2189 2190 if (v8_enable_snapshot_native_code_counters) { 2191 args += [ "--native-code-counters" ] 2192 } else { 2193 # --native-code-counters is the default in debug mode so make sure we can 2194 # unset it. 2195 args += [ "--no-native-code-counters" ] 2196 } 2197 2198 if (v8_enable_fast_mksnapshot) { 2199 args += [ 2200 "--no-turbo-rewrite-far-jumps", 2201 "--no-turbo-verify-allocation", 2202 ] 2203 2204 if (v8_enable_debugging_features && v8_enable_slow_dchecks) { 2205 # mksnapshot only accepts this flag if ENABLE_SLOW_DCHECKS is defined. 2206 args += [ "--no-enable-slow-asserts" ] 2207 } 2208 } 2209 2210 if (v8_enable_verify_heap) { 2211 args += [ "--verify-heap" ] 2212 } 2213 } 2214} 2215 2216run_mksnapshot("default") { 2217 args = [] 2218 embedded_variant = "Default" 2219} 2220if (emit_builtins_as_inline_asm) { 2221 asm_to_inline_asm("default") { 2222 args = [] 2223 } 2224} 2225 2226action("v8_dump_build_config") { 2227 script = "tools/testrunner/utils/dump_build_config.py" 2228 outputs = [ "$root_out_dir/v8_build_config.json" ] 2229 is_gcov_coverage = v8_code_coverage && !is_clang 2230 is_full_debug = v8_enable_debugging_features && !v8_optimized_debug 2231 args = [ 2232 rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), 2233 "current_cpu=\"$current_cpu\"", 2234 "dcheck_always_on=$dcheck_always_on", 2235 "is_android=$is_android", 2236 "is_asan=$is_asan", 2237 "is_cfi=$is_cfi", 2238 "is_clang=$is_clang", 2239 "is_component_build=$is_component_build", 2240 "is_debug=$v8_enable_debugging_features", 2241 "is_full_debug=$is_full_debug", 2242 "is_gcov_coverage=$is_gcov_coverage", 2243 "is_msan=$is_msan", 2244 "is_tsan=$is_tsan", 2245 "is_ubsan_vptr=$is_ubsan_vptr", 2246 "target_cpu=\"$target_cpu\"", 2247 "v8_current_cpu=\"$v8_current_cpu\"", 2248 "v8_enable_atomic_object_field_writes=" + 2249 "$v8_enable_atomic_object_field_writes", 2250 "v8_enable_concurrent_marking=$v8_enable_concurrent_marking", 2251 "v8_enable_single_generation=$v8_enable_single_generation", 2252 "v8_enable_i18n_support=$v8_enable_i18n_support", 2253 "v8_enable_verify_predictable=$v8_enable_verify_predictable", 2254 "v8_enable_verify_csa=$v8_enable_verify_csa", 2255 "v8_enable_lite_mode=$v8_enable_lite_mode", 2256 "v8_enable_runtime_call_stats=$v8_enable_runtime_call_stats", 2257 "v8_enable_pointer_compression=$v8_enable_pointer_compression", 2258 "v8_enable_pointer_compression_shared_cage=" + 2259 "$v8_enable_pointer_compression_shared_cage", 2260 "v8_enable_sandbox=$v8_enable_sandbox", 2261 "v8_enable_shared_ro_heap=$v8_enable_shared_ro_heap", 2262 "v8_enable_third_party_heap=$v8_enable_third_party_heap", 2263 "v8_enable_webassembly=$v8_enable_webassembly", 2264 "v8_dict_property_const_tracking=$v8_dict_property_const_tracking", 2265 "v8_control_flow_integrity=$v8_control_flow_integrity", 2266 "v8_target_cpu=\"$v8_target_cpu\"", 2267 "v8_enable_cet_shadow_stack=$v8_enable_cet_shadow_stack", 2268 ] 2269 2270 if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || 2271 v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { 2272 args += [ 2273 "mips_arch_variant=\"$mips_arch_variant\"", 2274 "mips_use_msa=$mips_use_msa", 2275 ] 2276 } 2277} 2278 2279############################################################################### 2280# Source Sets (aka static libraries) 2281# 2282 2283v8_source_set("v8_snapshot") { 2284 visibility = [ ":*" ] # Targets in this file can depend on this. 2285 2286 deps = [ 2287 ":v8_internal_headers", 2288 ":v8_libbase", 2289 ] 2290 public_deps = [ 2291 # This should be public so downstream targets can declare the snapshot 2292 # output file as their inputs. 2293 ":run_mksnapshot_default", 2294 ] 2295 2296 # Do not publicize any header to remove build dependency. 2297 public = [] 2298 2299 sources = [ "src/init/setup-isolate-deserialize.cc" ] 2300 if (v8_control_flow_integrity) { 2301 sources += [ "src/deoptimizer/deoptimizer-cfi-builtins.cc" ] 2302 } 2303 if (emit_builtins_as_inline_asm) { 2304 deps += [ ":asm_to_inline_asm_default" ] 2305 sources += [ "$target_gen_dir/embedded.cc" ] 2306 } else { 2307 sources += [ "$target_gen_dir/embedded.S" ] 2308 } 2309 2310 configs = [ ":internal_config" ] 2311 2312 if (v8_use_external_startup_data) { 2313 deps += [ ":v8_base" ] 2314 2315 sources += [ "src/snapshot/snapshot-external.cc" ] 2316 } else { 2317 # Also top-level visibility targets can depend on this. 2318 visibility += [ "//:gn_visibility" ] 2319 2320 public_deps += [ ":v8_maybe_icu" ] 2321 2322 sources += [ "$target_gen_dir/snapshot.cc" ] 2323 } 2324} 2325 2326v8_source_set("v8_initializers") { 2327 visibility = [ 2328 ":*", 2329 "test/cctest:*", 2330 ] 2331 2332 allow_circular_includes_from = [ ":torque_generated_initializers" ] 2333 2334 deps = [ 2335 ":torque_generated_initializers", 2336 ":v8_base_without_compiler", 2337 ":v8_shared_internal_headers", 2338 ":v8_tracing", 2339 ] 2340 2341 sources = [ 2342 ### gcmole(all) ### 2343 "src/builtins/builtins-array-gen.cc", 2344 "src/builtins/builtins-array-gen.h", 2345 "src/builtins/builtins-async-function-gen.cc", 2346 "src/builtins/builtins-async-gen.cc", 2347 "src/builtins/builtins-async-gen.h", 2348 "src/builtins/builtins-async-generator-gen.cc", 2349 "src/builtins/builtins-async-iterator-gen.cc", 2350 "src/builtins/builtins-bigint-gen.cc", 2351 "src/builtins/builtins-bigint-gen.h", 2352 "src/builtins/builtins-call-gen.cc", 2353 "src/builtins/builtins-call-gen.h", 2354 "src/builtins/builtins-collections-gen.cc", 2355 "src/builtins/builtins-collections-gen.h", 2356 "src/builtins/builtins-constructor-gen.cc", 2357 "src/builtins/builtins-constructor-gen.h", 2358 "src/builtins/builtins-constructor.h", 2359 "src/builtins/builtins-conversion-gen.cc", 2360 "src/builtins/builtins-data-view-gen.h", 2361 "src/builtins/builtins-date-gen.cc", 2362 "src/builtins/builtins-generator-gen.cc", 2363 "src/builtins/builtins-global-gen.cc", 2364 "src/builtins/builtins-handler-gen.cc", 2365 "src/builtins/builtins-ic-gen.cc", 2366 "src/builtins/builtins-internal-gen.cc", 2367 "src/builtins/builtins-interpreter-gen.cc", 2368 "src/builtins/builtins-intl-gen.cc", 2369 "src/builtins/builtins-iterator-gen.cc", 2370 "src/builtins/builtins-iterator-gen.h", 2371 "src/builtins/builtins-lazy-gen.cc", 2372 "src/builtins/builtins-lazy-gen.h", 2373 "src/builtins/builtins-microtask-queue-gen.cc", 2374 "src/builtins/builtins-number-gen.cc", 2375 "src/builtins/builtins-object-gen.cc", 2376 "src/builtins/builtins-promise-gen.cc", 2377 "src/builtins/builtins-promise-gen.h", 2378 "src/builtins/builtins-proxy-gen.cc", 2379 "src/builtins/builtins-proxy-gen.h", 2380 "src/builtins/builtins-regexp-gen.cc", 2381 "src/builtins/builtins-regexp-gen.h", 2382 "src/builtins/builtins-shadowrealm-gen.cc", 2383 "src/builtins/builtins-sharedarraybuffer-gen.cc", 2384 "src/builtins/builtins-string-gen.cc", 2385 "src/builtins/builtins-string-gen.h", 2386 "src/builtins/builtins-temporal-gen.cc", 2387 "src/builtins/builtins-typed-array-gen.cc", 2388 "src/builtins/builtins-typed-array-gen.h", 2389 "src/builtins/builtins-utils-gen.h", 2390 "src/builtins/growable-fixed-array-gen.cc", 2391 "src/builtins/growable-fixed-array-gen.h", 2392 "src/builtins/profile-data-reader.cc", 2393 "src/builtins/profile-data-reader.h", 2394 "src/builtins/setup-builtins-internal.cc", 2395 "src/builtins/torque-csa-header-includes.h", 2396 "src/codegen/code-stub-assembler.cc", 2397 "src/codegen/code-stub-assembler.h", 2398 "src/heap/setup-heap-internal.cc", 2399 "src/ic/accessor-assembler.cc", 2400 "src/ic/accessor-assembler.h", 2401 "src/ic/binary-op-assembler.cc", 2402 "src/ic/binary-op-assembler.h", 2403 "src/ic/keyed-store-generic.cc", 2404 "src/ic/keyed-store-generic.h", 2405 "src/ic/unary-op-assembler.cc", 2406 "src/ic/unary-op-assembler.h", 2407 "src/interpreter/interpreter-assembler.cc", 2408 "src/interpreter/interpreter-assembler.h", 2409 "src/interpreter/interpreter-generator.cc", 2410 "src/interpreter/interpreter-generator.h", 2411 "src/interpreter/interpreter-intrinsics-generator.cc", 2412 "src/interpreter/interpreter-intrinsics-generator.h", 2413 "src/numbers/integer-literal-inl.h", 2414 "src/numbers/integer-literal.h", 2415 ] 2416 2417 if (v8_enable_webassembly) { 2418 sources += [ 2419 "src/builtins/builtins-wasm-gen.cc", 2420 "src/builtins/builtins-wasm-gen.h", 2421 ] 2422 } 2423 2424 if (v8_current_cpu == "x86") { 2425 sources += [ 2426 ### gcmole(arch:ia32) ### 2427 "src/builtins/ia32/builtins-ia32.cc", 2428 ] 2429 } else if (v8_current_cpu == "x64") { 2430 sources += [ 2431 ### gcmole(arch:x64) ### 2432 "src/builtins/x64/builtins-x64.cc", 2433 ] 2434 } else if (v8_current_cpu == "arm") { 2435 sources += [ 2436 ### gcmole(arch:arm) ### 2437 "src/builtins/arm/builtins-arm.cc", 2438 ] 2439 } else if (v8_current_cpu == "arm64") { 2440 sources += [ 2441 ### gcmole(arch:arm64) ### 2442 "src/builtins/arm64/builtins-arm64.cc", 2443 ] 2444 } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { 2445 sources += [ 2446 ### gcmole(arch:mipsel) ### 2447 "src/builtins/mips/builtins-mips.cc", 2448 ] 2449 } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { 2450 sources += [ 2451 ### gcmole(arch:mips64el) ### 2452 "src/builtins/mips64/builtins-mips64.cc", 2453 ] 2454 } else if (v8_current_cpu == "loong64") { 2455 sources += [ 2456 ### gcmole(arch:loong64) ### 2457 "src/builtins/loong64/builtins-loong64.cc", 2458 ] 2459 } else if (v8_current_cpu == "ppc") { 2460 sources += [ 2461 ### gcmole(arch:ppc) ### 2462 "src/builtins/ppc/builtins-ppc.cc", 2463 ] 2464 } else if (v8_current_cpu == "ppc64") { 2465 sources += [ 2466 ### gcmole(arch:ppc64) ### 2467 "src/builtins/ppc/builtins-ppc.cc", 2468 ] 2469 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 2470 sources += [ 2471 ### gcmole(arch:s390) ### 2472 "src/builtins/s390/builtins-s390.cc", 2473 ] 2474 } else if (v8_current_cpu == "riscv64") { 2475 sources += [ 2476 ### gcmole(arch:riscv64) ### 2477 "src/builtins/riscv64/builtins-riscv64.cc", 2478 ] 2479 } 2480 2481 if (!v8_enable_i18n_support) { 2482 sources -= [ "src/builtins/builtins-intl-gen.cc" ] 2483 } 2484 2485 configs = [ ":internal_config" ] 2486} 2487 2488v8_source_set("v8_init") { 2489 visibility = [ ":*" ] # Only targets in this file can depend on this. 2490 2491 deps = [ 2492 ":v8_base_without_compiler", 2493 ":v8_initializers", 2494 ":v8_tracing", 2495 ] 2496 2497 sources = [ 2498 ### gcmole(all) ### 2499 "src/init/setup-isolate-full.cc", 2500 ] 2501 2502 public_deps = [ ":v8_maybe_icu" ] 2503 2504 configs = [ ":internal_config" ] 2505} 2506 2507# This is split out to be a non-code containing target that the Chromium browser 2508# DLL can depend upon to get only a version string. 2509v8_header_set("v8_version") { 2510 configs = [ ":internal_config" ] 2511 2512 sources = [ 2513 "include/v8-value-serializer-version.h", 2514 "include/v8-version-string.h", 2515 "include/v8-version.h", 2516 ] 2517} 2518 2519v8_header_set("v8_config_headers") { 2520 configs = [ ":internal_config" ] 2521 2522 sources = [ 2523 "include/v8-platform.h", 2524 "include/v8config.h", 2525 ] 2526 2527 deps = [] 2528 2529 if (v8_generate_external_defines_header) { 2530 sources += [ "$target_gen_dir/include/v8-gn.h" ] 2531 deps += [ ":gen_v8_gn" ] 2532 } 2533} 2534 2535# This is split out to be a non-code containing target that the Chromium browser 2536# can depend upon to get basic v8 types. 2537v8_header_set("v8_headers") { 2538 configs = [ ":internal_config" ] 2539 public_configs = [ ":headers_config" ] 2540 2541 sources = [ 2542 "include/v8-array-buffer.h", 2543 "include/v8-callbacks.h", 2544 "include/v8-container.h", 2545 "include/v8-context.h", 2546 "include/v8-cppgc.h", 2547 "include/v8-data.h", 2548 "include/v8-date.h", 2549 "include/v8-debug.h", 2550 "include/v8-embedder-heap.h", 2551 "include/v8-embedder-state-scope.h", 2552 "include/v8-exception.h", 2553 "include/v8-extension.h", 2554 "include/v8-external.h", 2555 "include/v8-fast-api-calls.h", 2556 "include/v8-forward.h", 2557 "include/v8-function-callback.h", 2558 "include/v8-function.h", 2559 "include/v8-initialization.h", 2560 "include/v8-internal.h", 2561 "include/v8-isolate.h", 2562 "include/v8-json.h", 2563 "include/v8-local-handle.h", 2564 "include/v8-locker.h", 2565 "include/v8-maybe.h", 2566 "include/v8-memory-span.h", 2567 "include/v8-message.h", 2568 "include/v8-microtask-queue.h", 2569 "include/v8-microtask.h", 2570 "include/v8-object.h", 2571 "include/v8-persistent-handle.h", 2572 "include/v8-primitive-object.h", 2573 "include/v8-primitive.h", 2574 "include/v8-profiler.h", 2575 "include/v8-promise.h", 2576 "include/v8-proxy.h", 2577 "include/v8-regexp.h", 2578 "include/v8-script.h", 2579 "include/v8-snapshot.h", 2580 "include/v8-statistics.h", 2581 "include/v8-template.h", 2582 "include/v8-traced-handle.h", 2583 "include/v8-typed-array.h", 2584 "include/v8-unwinder.h", 2585 "include/v8-util.h", 2586 "include/v8-value-serializer.h", 2587 "include/v8-value.h", 2588 "include/v8-wasm.h", 2589 "include/v8-weak-callback-info.h", 2590 "include/v8.h", 2591 ] 2592 2593 sources += [ 2594 # The following headers cannot be platform-specific. The include validation 2595 # of `gn gen $dir --check` requires all header files to be available on all 2596 # platforms. 2597 "include/v8-wasm-trap-handler-posix.h", 2598 "include/v8-wasm-trap-handler-win.h", 2599 ] 2600 2601 public_deps = [ ":v8_config_headers" ] 2602 2603 deps = [ 2604 ":cppgc_headers", 2605 ":v8_version", 2606 ] 2607} 2608 2609if (v8_generate_external_defines_header) { 2610 action("gen_v8_gn") { 2611 visibility = [ ":*" ] 2612 2613 script = "tools/gen-v8-gn.py" 2614 outputs = [ "$target_gen_dir/include/v8-gn.h" ] 2615 2616 args = [ 2617 "-o", 2618 rebase_path("$target_gen_dir/include/v8-gn.h", root_build_dir), 2619 ] 2620 foreach(define, enabled_external_defines) { 2621 args += [ 2622 "-p", 2623 define, 2624 ] 2625 } 2626 foreach(define, disabled_external_defines) { 2627 args += [ 2628 "-n", 2629 define, 2630 ] 2631 } 2632 } 2633} 2634 2635# This is split out to share basic headers with Torque and everything else:( 2636v8_header_set("v8_shared_internal_headers") { 2637 visibility = [ 2638 ":*", 2639 "test/*", 2640 "tools/*", 2641 ] 2642 configs = [ ":internal_config" ] 2643 2644 sources = [ 2645 "src/common/globals.h", 2646 "src/wasm/wasm-constants.h", 2647 "src/wasm/wasm-limits.h", 2648 ] 2649 2650 deps = [ 2651 ":v8_headers", 2652 ":v8_libbase", 2653 ] 2654} 2655 2656v8_header_set("v8_flags") { 2657 visibility = [ 2658 ":*", 2659 "tools/*", 2660 ] 2661 2662 configs = [ ":internal_config" ] 2663 2664 sources = [ 2665 "src/flags/flag-definitions.h", 2666 "src/flags/flags.h", 2667 ] 2668 2669 deps = [ ":v8_shared_internal_headers" ] 2670} 2671 2672v8_header_set("v8_internal_headers") { 2673 configs = [ ":internal_config" ] 2674 2675 sources = [ 2676 ### gcmole(all) ### 2677 "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", 2678 "//base/trace_event/common/trace_event_common.h", 2679 "include/cppgc/common.h", 2680 "include/v8-inspector-protocol.h", 2681 "include/v8-inspector.h", 2682 "include/v8-metrics.h", 2683 "include/v8-unwinder-state.h", 2684 "include/v8-wasm-trap-handler-posix.h", 2685 "src/api/api-arguments-inl.h", 2686 "src/api/api-arguments.h", 2687 "src/api/api-inl.h", 2688 "src/api/api-macros-undef.h", 2689 "src/api/api-macros.h", 2690 "src/api/api-natives.h", 2691 "src/api/api.h", 2692 "src/ast/ast-function-literal-id-reindexer.h", 2693 "src/ast/ast-source-ranges.h", 2694 "src/ast/ast-traversal-visitor.h", 2695 "src/ast/ast-value-factory.h", 2696 "src/ast/ast.h", 2697 "src/ast/modules.h", 2698 "src/ast/prettyprinter.h", 2699 "src/ast/scopes.h", 2700 "src/ast/source-range-ast-visitor.h", 2701 "src/ast/variables.h", 2702 "src/baseline/baseline-assembler-inl.h", 2703 "src/baseline/baseline-assembler.h", 2704 "src/baseline/baseline-batch-compiler.h", 2705 "src/baseline/baseline-compiler.h", 2706 "src/baseline/baseline.h", 2707 "src/baseline/bytecode-offset-iterator.h", 2708 "src/builtins/accessors.h", 2709 "src/builtins/builtins-constructor.h", 2710 "src/builtins/builtins-definitions.h", 2711 "src/builtins/builtins-descriptors.h", 2712 "src/builtins/builtins-promise.h", 2713 "src/builtins/builtins-utils-inl.h", 2714 "src/builtins/builtins-utils.h", 2715 "src/builtins/builtins.h", 2716 "src/builtins/constants-table-builder.h", 2717 "src/builtins/profile-data-reader.h", 2718 "src/codegen/aligned-slot-allocator.h", 2719 "src/codegen/assembler-arch.h", 2720 "src/codegen/assembler-inl.h", 2721 "src/codegen/assembler.h", 2722 "src/codegen/atomic-memory-order.h", 2723 "src/codegen/bailout-reason.h", 2724 "src/codegen/callable.h", 2725 "src/codegen/code-comments.h", 2726 "src/codegen/code-desc.h", 2727 "src/codegen/code-factory.h", 2728 "src/codegen/code-reference.h", 2729 "src/codegen/compilation-cache.h", 2730 "src/codegen/compiler.h", 2731 "src/codegen/constant-pool.h", 2732 "src/codegen/constants-arch.h", 2733 "src/codegen/cpu-features.h", 2734 "src/codegen/external-reference-encoder.h", 2735 "src/codegen/external-reference-table.h", 2736 "src/codegen/external-reference.h", 2737 "src/codegen/flush-instruction-cache.h", 2738 "src/codegen/handler-table.h", 2739 "src/codegen/interface-descriptors-inl.h", 2740 "src/codegen/interface-descriptors.h", 2741 "src/codegen/label.h", 2742 "src/codegen/machine-type.h", 2743 "src/codegen/macro-assembler-inl.h", 2744 "src/codegen/macro-assembler.h", 2745 "src/codegen/optimized-compilation-info.h", 2746 "src/codegen/pending-optimization-table.h", 2747 "src/codegen/register-arch.h", 2748 "src/codegen/register-base.h", 2749 "src/codegen/register-configuration.h", 2750 "src/codegen/register.h", 2751 "src/codegen/reglist-base.h", 2752 "src/codegen/reglist.h", 2753 "src/codegen/reloc-info.h", 2754 "src/codegen/safepoint-table.h", 2755 "src/codegen/script-details.h", 2756 "src/codegen/signature.h", 2757 "src/codegen/source-position-table.h", 2758 "src/codegen/source-position.h", 2759 "src/codegen/string-constants.h", 2760 "src/codegen/tick-counter.h", 2761 "src/codegen/tnode.h", 2762 "src/codegen/turbo-assembler.h", 2763 "src/codegen/unoptimized-compilation-info.h", 2764 "src/common/allow-deprecated.h", 2765 "src/common/assert-scope.h", 2766 "src/common/checks.h", 2767 "src/common/high-allocation-throughput-scope.h", 2768 "src/common/message-template.h", 2769 "src/common/operation.h", 2770 "src/common/ptr-compr-inl.h", 2771 "src/common/ptr-compr.h", 2772 "src/compiler-dispatcher/lazy-compile-dispatcher.h", 2773 "src/compiler-dispatcher/optimizing-compile-dispatcher.h", 2774 "src/compiler/access-builder.h", 2775 "src/compiler/access-info.h", 2776 "src/compiler/add-type-assertions-reducer.h", 2777 "src/compiler/all-nodes.h", 2778 "src/compiler/allocation-builder-inl.h", 2779 "src/compiler/allocation-builder.h", 2780 "src/compiler/backend/code-generator-impl.h", 2781 "src/compiler/backend/code-generator.h", 2782 "src/compiler/backend/frame-elider.h", 2783 "src/compiler/backend/gap-resolver.h", 2784 "src/compiler/backend/instruction-codes.h", 2785 "src/compiler/backend/instruction-scheduler.h", 2786 "src/compiler/backend/instruction-selector-impl.h", 2787 "src/compiler/backend/instruction-selector.h", 2788 "src/compiler/backend/instruction.h", 2789 "src/compiler/backend/jump-threading.h", 2790 "src/compiler/backend/mid-tier-register-allocator.h", 2791 "src/compiler/backend/move-optimizer.h", 2792 "src/compiler/backend/register-allocation.h", 2793 "src/compiler/backend/register-allocator-verifier.h", 2794 "src/compiler/backend/register-allocator.h", 2795 "src/compiler/backend/spill-placer.h", 2796 "src/compiler/backend/unwinding-info-writer.h", 2797 "src/compiler/basic-block-instrumentor.h", 2798 "src/compiler/branch-condition-duplicator.h", 2799 "src/compiler/branch-elimination.h", 2800 "src/compiler/bytecode-analysis.h", 2801 "src/compiler/bytecode-graph-builder.h", 2802 "src/compiler/bytecode-liveness-map.h", 2803 "src/compiler/checkpoint-elimination.h", 2804 "src/compiler/code-assembler.h", 2805 "src/compiler/common-node-cache.h", 2806 "src/compiler/common-operator-reducer.h", 2807 "src/compiler/common-operator.h", 2808 "src/compiler/compilation-dependencies.h", 2809 "src/compiler/compiler-source-position-table.h", 2810 "src/compiler/constant-folding-reducer.h", 2811 "src/compiler/control-equivalence.h", 2812 "src/compiler/control-flow-optimizer.h", 2813 "src/compiler/csa-load-elimination.h", 2814 "src/compiler/dead-code-elimination.h", 2815 "src/compiler/decompression-optimizer.h", 2816 "src/compiler/diamond.h", 2817 "src/compiler/effect-control-linearizer.h", 2818 "src/compiler/escape-analysis-reducer.h", 2819 "src/compiler/escape-analysis.h", 2820 "src/compiler/fast-api-calls.h", 2821 "src/compiler/feedback-source.h", 2822 "src/compiler/frame-states.h", 2823 "src/compiler/frame.h", 2824 "src/compiler/functional-list.h", 2825 "src/compiler/globals.h", 2826 "src/compiler/graph-assembler.h", 2827 "src/compiler/graph-reducer.h", 2828 "src/compiler/graph-trimmer.h", 2829 "src/compiler/graph-visualizer.h", 2830 "src/compiler/graph-zone-traits.h", 2831 "src/compiler/graph.h", 2832 "src/compiler/heap-refs.h", 2833 "src/compiler/js-call-reducer.h", 2834 "src/compiler/js-context-specialization.h", 2835 "src/compiler/js-create-lowering.h", 2836 "src/compiler/js-generic-lowering.h", 2837 "src/compiler/js-graph.h", 2838 "src/compiler/js-heap-broker.h", 2839 "src/compiler/js-inlining-heuristic.h", 2840 "src/compiler/js-inlining.h", 2841 "src/compiler/js-intrinsic-lowering.h", 2842 "src/compiler/js-native-context-specialization.h", 2843 "src/compiler/js-operator.h", 2844 "src/compiler/js-type-hint-lowering.h", 2845 "src/compiler/js-typed-lowering.h", 2846 "src/compiler/linkage.h", 2847 "src/compiler/load-elimination.h", 2848 "src/compiler/loop-analysis.h", 2849 "src/compiler/loop-peeling.h", 2850 "src/compiler/loop-unrolling.h", 2851 "src/compiler/loop-variable-optimizer.h", 2852 "src/compiler/machine-graph-verifier.h", 2853 "src/compiler/machine-graph.h", 2854 "src/compiler/machine-operator-reducer.h", 2855 "src/compiler/machine-operator.h", 2856 "src/compiler/map-inference.h", 2857 "src/compiler/memory-lowering.h", 2858 "src/compiler/memory-optimizer.h", 2859 "src/compiler/node-aux-data.h", 2860 "src/compiler/node-cache.h", 2861 "src/compiler/node-marker.h", 2862 "src/compiler/node-matchers.h", 2863 "src/compiler/node-observer.h", 2864 "src/compiler/node-origin-table.h", 2865 "src/compiler/node-properties.h", 2866 "src/compiler/node.h", 2867 "src/compiler/opcodes.h", 2868 "src/compiler/operation-typer.h", 2869 "src/compiler/operator-properties.h", 2870 "src/compiler/operator.h", 2871 "src/compiler/osr.h", 2872 "src/compiler/per-isolate-compiler-cache.h", 2873 "src/compiler/persistent-map.h", 2874 "src/compiler/pipeline-statistics.h", 2875 "src/compiler/pipeline.h", 2876 "src/compiler/processed-feedback.h", 2877 "src/compiler/property-access-builder.h", 2878 "src/compiler/raw-machine-assembler.h", 2879 "src/compiler/redundancy-elimination.h", 2880 "src/compiler/refs-map.h", 2881 "src/compiler/representation-change.h", 2882 "src/compiler/schedule.h", 2883 "src/compiler/scheduler.h", 2884 "src/compiler/select-lowering.h", 2885 "src/compiler/simplified-lowering-verifier.h", 2886 "src/compiler/simplified-lowering.h", 2887 "src/compiler/simplified-operator-reducer.h", 2888 "src/compiler/simplified-operator.h", 2889 "src/compiler/state-values-utils.h", 2890 "src/compiler/store-store-elimination.h", 2891 "src/compiler/type-cache.h", 2892 "src/compiler/type-narrowing-reducer.h", 2893 "src/compiler/typed-optimization.h", 2894 "src/compiler/typer.h", 2895 "src/compiler/types.h", 2896 "src/compiler/value-numbering-reducer.h", 2897 "src/compiler/verifier.h", 2898 "src/compiler/write-barrier-kind.h", 2899 "src/compiler/zone-stats.h", 2900 "src/date/date.h", 2901 "src/date/dateparser-inl.h", 2902 "src/date/dateparser.h", 2903 "src/debug/debug-coverage.h", 2904 "src/debug/debug-evaluate.h", 2905 "src/debug/debug-frames.h", 2906 "src/debug/debug-interface.h", 2907 "src/debug/debug-property-iterator.h", 2908 "src/debug/debug-scope-iterator.h", 2909 "src/debug/debug-scopes.h", 2910 "src/debug/debug-stack-trace-iterator.h", 2911 "src/debug/debug-type-profile.h", 2912 "src/debug/debug.h", 2913 "src/debug/interface-types.h", 2914 "src/debug/liveedit.h", 2915 "src/deoptimizer/deoptimize-reason.h", 2916 "src/deoptimizer/deoptimized-frame-info.h", 2917 "src/deoptimizer/deoptimizer.h", 2918 "src/deoptimizer/frame-description.h", 2919 "src/deoptimizer/materialized-object-store.h", 2920 "src/deoptimizer/translated-state.h", 2921 "src/deoptimizer/translation-array.h", 2922 "src/deoptimizer/translation-opcode.h", 2923 "src/diagnostics/basic-block-profiler.h", 2924 "src/diagnostics/code-tracer.h", 2925 "src/diagnostics/compilation-statistics.h", 2926 "src/diagnostics/disasm.h", 2927 "src/diagnostics/disassembler.h", 2928 "src/diagnostics/eh-frame.h", 2929 "src/diagnostics/gdb-jit.h", 2930 "src/diagnostics/perf-jit.h", 2931 "src/diagnostics/unwinder.h", 2932 "src/execution/arguments-inl.h", 2933 "src/execution/arguments.h", 2934 "src/execution/clobber-registers.h", 2935 "src/execution/embedder-state.h", 2936 "src/execution/encoded-c-signature.h", 2937 "src/execution/execution.h", 2938 "src/execution/frame-constants.h", 2939 "src/execution/frames-inl.h", 2940 "src/execution/frames.h", 2941 "src/execution/futex-emulation.h", 2942 "src/execution/interrupts-scope.h", 2943 "src/execution/isolate-data.h", 2944 "src/execution/isolate-inl.h", 2945 "src/execution/isolate-utils-inl.h", 2946 "src/execution/isolate-utils.h", 2947 "src/execution/isolate.h", 2948 "src/execution/local-isolate-inl.h", 2949 "src/execution/local-isolate.h", 2950 "src/execution/messages.h", 2951 "src/execution/microtask-queue.h", 2952 "src/execution/pointer-authentication.h", 2953 "src/execution/protectors-inl.h", 2954 "src/execution/protectors.h", 2955 "src/execution/shared-mutex-guard-if-off-thread.h", 2956 "src/execution/simulator-base.h", 2957 "src/execution/simulator.h", 2958 "src/execution/stack-guard.h", 2959 "src/execution/thread-id.h", 2960 "src/execution/thread-local-top.h", 2961 "src/execution/tiering-manager.h", 2962 "src/execution/v8threads.h", 2963 "src/execution/vm-state-inl.h", 2964 "src/execution/vm-state.h", 2965 "src/extensions/cputracemark-extension.h", 2966 "src/extensions/externalize-string-extension.h", 2967 "src/extensions/gc-extension.h", 2968 "src/extensions/ignition-statistics-extension.h", 2969 "src/extensions/statistics-extension.h", 2970 "src/extensions/trigger-failure-extension.h", 2971 "src/handles/global-handles-inl.h", 2972 "src/handles/global-handles.h", 2973 "src/handles/handles-inl.h", 2974 "src/handles/handles.h", 2975 "src/handles/local-handles-inl.h", 2976 "src/handles/local-handles.h", 2977 "src/handles/maybe-handles-inl.h", 2978 "src/handles/maybe-handles.h", 2979 "src/handles/persistent-handles.h", 2980 "src/heap/allocation-observer.h", 2981 "src/heap/allocation-result.h", 2982 "src/heap/allocation-stats.h", 2983 "src/heap/array-buffer-sweeper.h", 2984 "src/heap/base-space.h", 2985 "src/heap/basic-memory-chunk.h", 2986 "src/heap/code-object-registry.h", 2987 "src/heap/code-range.h", 2988 "src/heap/code-stats.h", 2989 "src/heap/collection-barrier.h", 2990 "src/heap/combined-heap.h", 2991 "src/heap/concurrent-allocator-inl.h", 2992 "src/heap/concurrent-allocator.h", 2993 "src/heap/concurrent-marking.h", 2994 "src/heap/cppgc-js/cpp-heap.h", 2995 "src/heap/cppgc-js/cpp-marking-state-inl.h", 2996 "src/heap/cppgc-js/cpp-marking-state.h", 2997 "src/heap/cppgc-js/cpp-snapshot.h", 2998 "src/heap/cppgc-js/unified-heap-marking-state-inl.h", 2999 "src/heap/cppgc-js/unified-heap-marking-state.h", 3000 "src/heap/cppgc-js/unified-heap-marking-verifier.h", 3001 "src/heap/cppgc-js/unified-heap-marking-visitor.h", 3002 "src/heap/embedder-tracing-inl.h", 3003 "src/heap/embedder-tracing.h", 3004 "src/heap/evacuation-allocator-inl.h", 3005 "src/heap/evacuation-allocator.h", 3006 "src/heap/factory-base-inl.h", 3007 "src/heap/factory-base.h", 3008 "src/heap/factory-inl.h", 3009 "src/heap/factory.h", 3010 "src/heap/finalization-registry-cleanup-task.h", 3011 "src/heap/free-list-inl.h", 3012 "src/heap/free-list.h", 3013 "src/heap/gc-idle-time-handler.h", 3014 "src/heap/gc-tracer-inl.h", 3015 "src/heap/gc-tracer.h", 3016 "src/heap/heap-allocator-inl.h", 3017 "src/heap/heap-allocator.h", 3018 "src/heap/heap-controller.h", 3019 "src/heap/heap-inl.h", 3020 "src/heap/heap-layout-tracer.h", 3021 "src/heap/heap-write-barrier-inl.h", 3022 "src/heap/heap-write-barrier.h", 3023 "src/heap/heap.h", 3024 "src/heap/incremental-marking-inl.h", 3025 "src/heap/incremental-marking-job.h", 3026 "src/heap/incremental-marking.h", 3027 "src/heap/index-generator.h", 3028 "src/heap/invalidated-slots-inl.h", 3029 "src/heap/invalidated-slots.h", 3030 "src/heap/large-spaces.h", 3031 "src/heap/linear-allocation-area.h", 3032 "src/heap/list.h", 3033 "src/heap/local-factory-inl.h", 3034 "src/heap/local-factory.h", 3035 "src/heap/local-heap-inl.h", 3036 "src/heap/local-heap.h", 3037 "src/heap/mark-compact-inl.h", 3038 "src/heap/mark-compact.h", 3039 "src/heap/marking-barrier-inl.h", 3040 "src/heap/marking-barrier.h", 3041 "src/heap/marking-visitor-inl.h", 3042 "src/heap/marking-visitor.h", 3043 "src/heap/marking-worklist-inl.h", 3044 "src/heap/marking-worklist.h", 3045 "src/heap/marking.h", 3046 "src/heap/memory-allocator.h", 3047 "src/heap/memory-chunk-inl.h", 3048 "src/heap/memory-chunk-layout.h", 3049 "src/heap/memory-chunk.h", 3050 "src/heap/memory-measurement-inl.h", 3051 "src/heap/memory-measurement.h", 3052 "src/heap/memory-reducer.h", 3053 "src/heap/new-spaces-inl.h", 3054 "src/heap/new-spaces.h", 3055 "src/heap/object-stats.h", 3056 "src/heap/objects-visiting-inl.h", 3057 "src/heap/objects-visiting.h", 3058 "src/heap/paged-spaces-inl.h", 3059 "src/heap/paged-spaces.h", 3060 "src/heap/parallel-work-item.h", 3061 "src/heap/parked-scope.h", 3062 "src/heap/progress-bar.h", 3063 "src/heap/read-only-heap-inl.h", 3064 "src/heap/read-only-heap.h", 3065 "src/heap/read-only-spaces.h", 3066 "src/heap/remembered-set-inl.h", 3067 "src/heap/remembered-set.h", 3068 "src/heap/safepoint.h", 3069 "src/heap/scavenge-job.h", 3070 "src/heap/scavenger-inl.h", 3071 "src/heap/scavenger.h", 3072 "src/heap/slot-set.h", 3073 "src/heap/spaces-inl.h", 3074 "src/heap/spaces.h", 3075 "src/heap/stress-marking-observer.h", 3076 "src/heap/stress-scavenge-observer.h", 3077 "src/heap/sweeper.h", 3078 "src/heap/weak-object-worklists.h", 3079 "src/ic/call-optimization.h", 3080 "src/ic/handler-configuration-inl.h", 3081 "src/ic/handler-configuration.h", 3082 "src/ic/ic-inl.h", 3083 "src/ic/ic-stats.h", 3084 "src/ic/ic.h", 3085 "src/ic/stub-cache.h", 3086 "src/init/bootstrapper.h", 3087 "src/init/heap-symbols.h", 3088 "src/init/icu_util.h", 3089 "src/init/isolate-allocator.h", 3090 "src/init/setup-isolate.h", 3091 "src/init/startup-data-util.h", 3092 "src/init/v8.h", 3093 "src/interpreter/block-coverage-builder.h", 3094 "src/interpreter/bytecode-array-builder.h", 3095 "src/interpreter/bytecode-array-iterator.h", 3096 "src/interpreter/bytecode-array-random-iterator.h", 3097 "src/interpreter/bytecode-array-writer.h", 3098 "src/interpreter/bytecode-decoder.h", 3099 "src/interpreter/bytecode-flags.h", 3100 "src/interpreter/bytecode-generator.h", 3101 "src/interpreter/bytecode-jump-table.h", 3102 "src/interpreter/bytecode-label.h", 3103 "src/interpreter/bytecode-node.h", 3104 "src/interpreter/bytecode-operands.h", 3105 "src/interpreter/bytecode-register-allocator.h", 3106 "src/interpreter/bytecode-register-optimizer.h", 3107 "src/interpreter/bytecode-register.h", 3108 "src/interpreter/bytecode-source-info.h", 3109 "src/interpreter/bytecode-traits.h", 3110 "src/interpreter/bytecodes.h", 3111 "src/interpreter/constant-array-builder.h", 3112 "src/interpreter/control-flow-builders.h", 3113 "src/interpreter/handler-table-builder.h", 3114 "src/interpreter/interpreter-generator.h", 3115 "src/interpreter/interpreter-intrinsics.h", 3116 "src/interpreter/interpreter.h", 3117 "src/json/json-parser.h", 3118 "src/json/json-stringifier.h", 3119 "src/libsampler/sampler.h", 3120 "src/logging/code-events.h", 3121 "src/logging/counters-definitions.h", 3122 "src/logging/counters-scopes.h", 3123 "src/logging/counters.h", 3124 "src/logging/local-logger.h", 3125 "src/logging/log-inl.h", 3126 "src/logging/log-utils.h", 3127 "src/logging/log.h", 3128 "src/logging/metrics.h", 3129 "src/logging/runtime-call-stats-scope.h", 3130 "src/logging/runtime-call-stats.h", 3131 "src/logging/tracing-flags.h", 3132 "src/numbers/conversions-inl.h", 3133 "src/numbers/conversions.h", 3134 "src/numbers/hash-seed-inl.h", 3135 "src/numbers/math-random.h", 3136 "src/objects/all-objects-inl.h", 3137 "src/objects/allocation-site-inl.h", 3138 "src/objects/allocation-site-scopes-inl.h", 3139 "src/objects/allocation-site-scopes.h", 3140 "src/objects/allocation-site.h", 3141 "src/objects/api-callbacks-inl.h", 3142 "src/objects/api-callbacks.h", 3143 "src/objects/arguments-inl.h", 3144 "src/objects/arguments.h", 3145 "src/objects/backing-store.h", 3146 "src/objects/bigint-inl.h", 3147 "src/objects/bigint.h", 3148 "src/objects/call-site-info-inl.h", 3149 "src/objects/call-site-info.h", 3150 "src/objects/cell-inl.h", 3151 "src/objects/cell.h", 3152 "src/objects/code-inl.h", 3153 "src/objects/code-kind.h", 3154 "src/objects/code.h", 3155 "src/objects/compilation-cache-table-inl.h", 3156 "src/objects/compilation-cache-table.h", 3157 "src/objects/compressed-slots-inl.h", 3158 "src/objects/compressed-slots.h", 3159 "src/objects/contexts-inl.h", 3160 "src/objects/contexts.h", 3161 "src/objects/data-handler-inl.h", 3162 "src/objects/data-handler.h", 3163 "src/objects/debug-objects-inl.h", 3164 "src/objects/debug-objects.h", 3165 "src/objects/descriptor-array-inl.h", 3166 "src/objects/descriptor-array.h", 3167 "src/objects/dictionary-inl.h", 3168 "src/objects/dictionary.h", 3169 "src/objects/elements-inl.h", 3170 "src/objects/elements-kind.h", 3171 "src/objects/elements.h", 3172 "src/objects/embedder-data-array-inl.h", 3173 "src/objects/embedder-data-array.h", 3174 "src/objects/embedder-data-slot-inl.h", 3175 "src/objects/embedder-data-slot.h", 3176 "src/objects/feedback-cell-inl.h", 3177 "src/objects/feedback-cell.h", 3178 "src/objects/feedback-vector-inl.h", 3179 "src/objects/feedback-vector.h", 3180 "src/objects/field-index-inl.h", 3181 "src/objects/field-index.h", 3182 "src/objects/field-type.h", 3183 "src/objects/fixed-array-inl.h", 3184 "src/objects/fixed-array.h", 3185 "src/objects/foreign-inl.h", 3186 "src/objects/foreign.h", 3187 "src/objects/free-space-inl.h", 3188 "src/objects/free-space.h", 3189 "src/objects/function-kind.h", 3190 "src/objects/function-syntax-kind.h", 3191 "src/objects/hash-table-inl.h", 3192 "src/objects/hash-table.h", 3193 "src/objects/heap-number-inl.h", 3194 "src/objects/heap-number.h", 3195 "src/objects/heap-object-inl.h", 3196 "src/objects/heap-object.h", 3197 "src/objects/instance-type-inl.h", 3198 "src/objects/instance-type.h", 3199 "src/objects/internal-index.h", 3200 "src/objects/js-array-buffer-inl.h", 3201 "src/objects/js-array-buffer.h", 3202 "src/objects/js-array-inl.h", 3203 "src/objects/js-array.h", 3204 "src/objects/js-collection-inl.h", 3205 "src/objects/js-collection-iterator-inl.h", 3206 "src/objects/js-collection-iterator.h", 3207 "src/objects/js-collection.h", 3208 "src/objects/js-function-inl.h", 3209 "src/objects/js-function.h", 3210 "src/objects/js-generator-inl.h", 3211 "src/objects/js-generator.h", 3212 "src/objects/js-objects-inl.h", 3213 "src/objects/js-objects.h", 3214 "src/objects/js-promise-inl.h", 3215 "src/objects/js-promise.h", 3216 "src/objects/js-proxy-inl.h", 3217 "src/objects/js-proxy.h", 3218 "src/objects/js-regexp-inl.h", 3219 "src/objects/js-regexp-string-iterator-inl.h", 3220 "src/objects/js-regexp-string-iterator.h", 3221 "src/objects/js-regexp.h", 3222 "src/objects/js-segments-inl.h", 3223 "src/objects/js-segments.h", 3224 "src/objects/js-shadow-realms-inl.h", 3225 "src/objects/js-shadow-realms.h", 3226 "src/objects/js-struct-inl.h", 3227 "src/objects/js-struct.h", 3228 "src/objects/js-temporal-objects-inl.h", 3229 "src/objects/js-temporal-objects.h", 3230 "src/objects/js-weak-refs-inl.h", 3231 "src/objects/js-weak-refs.h", 3232 "src/objects/keys.h", 3233 "src/objects/literal-objects-inl.h", 3234 "src/objects/literal-objects.h", 3235 "src/objects/lookup-cache-inl.h", 3236 "src/objects/lookup-cache.h", 3237 "src/objects/lookup-inl.h", 3238 "src/objects/lookup.h", 3239 "src/objects/managed-inl.h", 3240 "src/objects/managed.h", 3241 "src/objects/map-inl.h", 3242 "src/objects/map-updater.h", 3243 "src/objects/map.h", 3244 "src/objects/maybe-object-inl.h", 3245 "src/objects/maybe-object.h", 3246 "src/objects/megadom-handler-inl.h", 3247 "src/objects/megadom-handler.h", 3248 "src/objects/microtask-inl.h", 3249 "src/objects/microtask.h", 3250 "src/objects/module-inl.h", 3251 "src/objects/module.h", 3252 "src/objects/name-inl.h", 3253 "src/objects/name.h", 3254 "src/objects/object-list-macros.h", 3255 "src/objects/object-macros-undef.h", 3256 "src/objects/object-macros.h", 3257 "src/objects/object-type.h", 3258 "src/objects/objects-body-descriptors-inl.h", 3259 "src/objects/objects-body-descriptors.h", 3260 "src/objects/objects-definitions.h", 3261 "src/objects/objects-inl.h", 3262 "src/objects/objects.h", 3263 "src/objects/oddball-inl.h", 3264 "src/objects/oddball.h", 3265 "src/objects/option-utils.h", 3266 "src/objects/ordered-hash-table-inl.h", 3267 "src/objects/ordered-hash-table.h", 3268 "src/objects/osr-optimized-code-cache-inl.h", 3269 "src/objects/osr-optimized-code-cache.h", 3270 "src/objects/primitive-heap-object-inl.h", 3271 "src/objects/primitive-heap-object.h", 3272 "src/objects/promise-inl.h", 3273 "src/objects/promise.h", 3274 "src/objects/property-array-inl.h", 3275 "src/objects/property-array.h", 3276 "src/objects/property-cell-inl.h", 3277 "src/objects/property-cell.h", 3278 "src/objects/property-descriptor-object-inl.h", 3279 "src/objects/property-descriptor-object.h", 3280 "src/objects/property-descriptor.h", 3281 "src/objects/property-details.h", 3282 "src/objects/property.h", 3283 "src/objects/prototype-info-inl.h", 3284 "src/objects/prototype-info.h", 3285 "src/objects/prototype-inl.h", 3286 "src/objects/prototype.h", 3287 "src/objects/regexp-match-info.h", 3288 "src/objects/scope-info-inl.h", 3289 "src/objects/scope-info.h", 3290 "src/objects/script-inl.h", 3291 "src/objects/script.h", 3292 "src/objects/shared-function-info-inl.h", 3293 "src/objects/shared-function-info.h", 3294 "src/objects/slots-atomic-inl.h", 3295 "src/objects/slots-inl.h", 3296 "src/objects/slots.h", 3297 "src/objects/smi-inl.h", 3298 "src/objects/smi.h", 3299 "src/objects/source-text-module-inl.h", 3300 "src/objects/source-text-module.h", 3301 "src/objects/string-comparator.h", 3302 "src/objects/string-inl.h", 3303 "src/objects/string-set-inl.h", 3304 "src/objects/string-set.h", 3305 "src/objects/string-table-inl.h", 3306 "src/objects/string-table.h", 3307 "src/objects/string.h", 3308 "src/objects/struct-inl.h", 3309 "src/objects/struct.h", 3310 "src/objects/swiss-hash-table-helpers.h", 3311 "src/objects/swiss-name-dictionary-inl.h", 3312 "src/objects/swiss-name-dictionary.h", 3313 "src/objects/synthetic-module-inl.h", 3314 "src/objects/synthetic-module.h", 3315 "src/objects/tagged-field-inl.h", 3316 "src/objects/tagged-field.h", 3317 "src/objects/tagged-impl-inl.h", 3318 "src/objects/tagged-impl.h", 3319 "src/objects/tagged-index.h", 3320 "src/objects/tagged-value-inl.h", 3321 "src/objects/tagged-value.h", 3322 "src/objects/template-objects-inl.h", 3323 "src/objects/template-objects.h", 3324 "src/objects/templates-inl.h", 3325 "src/objects/templates.h", 3326 "src/objects/torque-defined-classes-inl.h", 3327 "src/objects/torque-defined-classes.h", 3328 "src/objects/transitions-inl.h", 3329 "src/objects/transitions.h", 3330 "src/objects/turbofan-types-inl.h", 3331 "src/objects/turbofan-types.h", 3332 "src/objects/type-hints.h", 3333 "src/objects/value-serializer.h", 3334 "src/objects/visitors-inl.h", 3335 "src/objects/visitors.h", 3336 "src/parsing/expression-scope.h", 3337 "src/parsing/func-name-inferrer.h", 3338 "src/parsing/import-assertions.h", 3339 "src/parsing/keywords-gen.h", 3340 "src/parsing/literal-buffer.h", 3341 "src/parsing/parse-info.h", 3342 "src/parsing/parser-base.h", 3343 "src/parsing/parser.h", 3344 "src/parsing/parsing.h", 3345 "src/parsing/pending-compilation-error-handler.h", 3346 "src/parsing/preparse-data-impl.h", 3347 "src/parsing/preparse-data.h", 3348 "src/parsing/preparser-logger.h", 3349 "src/parsing/preparser.h", 3350 "src/parsing/rewriter.h", 3351 "src/parsing/scanner-character-streams.h", 3352 "src/parsing/scanner-inl.h", 3353 "src/parsing/scanner.h", 3354 "src/parsing/token.h", 3355 "src/profiler/allocation-tracker.h", 3356 "src/profiler/circular-queue-inl.h", 3357 "src/profiler/circular-queue.h", 3358 "src/profiler/cpu-profiler-inl.h", 3359 "src/profiler/cpu-profiler.h", 3360 "src/profiler/heap-profiler.h", 3361 "src/profiler/heap-snapshot-generator-inl.h", 3362 "src/profiler/heap-snapshot-generator.h", 3363 "src/profiler/profile-generator-inl.h", 3364 "src/profiler/profile-generator.h", 3365 "src/profiler/profiler-listener.h", 3366 "src/profiler/profiler-stats.h", 3367 "src/profiler/sampling-heap-profiler.h", 3368 "src/profiler/strings-storage.h", 3369 "src/profiler/symbolizer.h", 3370 "src/profiler/tick-sample.h", 3371 "src/profiler/tracing-cpu-profiler.h", 3372 "src/profiler/weak-code-registry.h", 3373 "src/regexp/experimental/experimental-bytecode.h", 3374 "src/regexp/experimental/experimental-compiler.h", 3375 "src/regexp/experimental/experimental-interpreter.h", 3376 "src/regexp/experimental/experimental.h", 3377 "src/regexp/property-sequences.h", 3378 "src/regexp/regexp-ast.h", 3379 "src/regexp/regexp-bytecode-generator-inl.h", 3380 "src/regexp/regexp-bytecode-generator.h", 3381 "src/regexp/regexp-bytecode-peephole.h", 3382 "src/regexp/regexp-bytecodes.h", 3383 "src/regexp/regexp-compiler.h", 3384 "src/regexp/regexp-dotprinter.h", 3385 "src/regexp/regexp-error.h", 3386 "src/regexp/regexp-flags.h", 3387 "src/regexp/regexp-interpreter.h", 3388 "src/regexp/regexp-macro-assembler-arch.h", 3389 "src/regexp/regexp-macro-assembler-tracer.h", 3390 "src/regexp/regexp-macro-assembler.h", 3391 "src/regexp/regexp-nodes.h", 3392 "src/regexp/regexp-parser.h", 3393 "src/regexp/regexp-stack.h", 3394 "src/regexp/regexp-utils.h", 3395 "src/regexp/regexp.h", 3396 "src/regexp/special-case.h", 3397 "src/roots/roots-inl.h", 3398 "src/roots/roots.h", 3399 "src/runtime/runtime-utils.h", 3400 "src/runtime/runtime.h", 3401 "src/sandbox/external-pointer-inl.h", 3402 "src/sandbox/external-pointer-table-inl.h", 3403 "src/sandbox/external-pointer-table.h", 3404 "src/sandbox/external-pointer.h", 3405 "src/sandbox/sandbox.h", 3406 "src/sandbox/sandboxed-pointer-inl.h", 3407 "src/sandbox/sandboxed-pointer.h", 3408 "src/snapshot/code-serializer.h", 3409 "src/snapshot/context-deserializer.h", 3410 "src/snapshot/context-serializer.h", 3411 "src/snapshot/deserializer.h", 3412 "src/snapshot/embedded/embedded-data-inl.h", 3413 "src/snapshot/embedded/embedded-data.h", 3414 "src/snapshot/embedded/embedded-file-writer-interface.h", 3415 "src/snapshot/object-deserializer.h", 3416 "src/snapshot/read-only-deserializer.h", 3417 "src/snapshot/read-only-serializer.h", 3418 "src/snapshot/references.h", 3419 "src/snapshot/roots-serializer.h", 3420 "src/snapshot/serializer-deserializer.h", 3421 "src/snapshot/serializer-inl.h", 3422 "src/snapshot/serializer.h", 3423 "src/snapshot/shared-heap-deserializer.h", 3424 "src/snapshot/shared-heap-serializer.h", 3425 "src/snapshot/snapshot-compression.h", 3426 "src/snapshot/snapshot-data.h", 3427 "src/snapshot/snapshot-source-sink.h", 3428 "src/snapshot/snapshot-utils.h", 3429 "src/snapshot/snapshot.h", 3430 "src/snapshot/startup-deserializer.h", 3431 "src/snapshot/startup-serializer.h", 3432 "src/strings/char-predicates-inl.h", 3433 "src/strings/char-predicates.h", 3434 "src/strings/string-builder-inl.h", 3435 "src/strings/string-case.h", 3436 "src/strings/string-hasher-inl.h", 3437 "src/strings/string-hasher.h", 3438 "src/strings/string-search.h", 3439 "src/strings/string-stream.h", 3440 "src/strings/unicode-decoder.h", 3441 "src/strings/unicode-inl.h", 3442 "src/strings/unicode.h", 3443 "src/strings/uri.h", 3444 "src/tasks/cancelable-task.h", 3445 "src/tasks/operations-barrier.h", 3446 "src/tasks/task-utils.h", 3447 "src/temporal/temporal-parser.h", 3448 "src/third_party/siphash/halfsiphash.h", 3449 "src/third_party/utf8-decoder/utf8-decoder.h", 3450 "src/torque/runtime-macro-shims.h", 3451 "src/tracing/trace-event.h", 3452 "src/tracing/traced-value.h", 3453 "src/tracing/tracing-category-observer.h", 3454 "src/utils/address-map.h", 3455 "src/utils/allocation.h", 3456 "src/utils/bit-vector.h", 3457 "src/utils/boxed-float.h", 3458 "src/utils/detachable-vector.h", 3459 "src/utils/identity-map.h", 3460 "src/utils/locked-queue-inl.h", 3461 "src/utils/locked-queue.h", 3462 "src/utils/memcopy.h", 3463 "src/utils/ostreams.h", 3464 "src/utils/scoped-list.h", 3465 "src/utils/utils-inl.h", 3466 "src/utils/utils.h", 3467 "src/utils/version.h", 3468 "src/zone/accounting-allocator.h", 3469 "src/zone/compressed-zone-ptr.h", 3470 "src/zone/type-stats.h", 3471 "src/zone/zone-allocator.h", 3472 "src/zone/zone-chunk-list.h", 3473 "src/zone/zone-compression.h", 3474 "src/zone/zone-containers.h", 3475 "src/zone/zone-handle-set.h", 3476 "src/zone/zone-hashmap.h", 3477 "src/zone/zone-list-inl.h", 3478 "src/zone/zone-list.h", 3479 "src/zone/zone-segment.h", 3480 "src/zone/zone-type-traits.h", 3481 "src/zone/zone-utils.h", 3482 "src/zone/zone.h", 3483 ] 3484 3485 if (v8_use_perfetto) { 3486 sources -= [ "//base/trace_event/common/trace_event_common.h" ] 3487 } 3488 3489 if (v8_enable_maglev) { 3490 sources += [ 3491 "src/maglev/maglev-basic-block.h", 3492 "src/maglev/maglev-code-gen-state.h", 3493 "src/maglev/maglev-code-generator.h", 3494 "src/maglev/maglev-compilation-info.h", 3495 "src/maglev/maglev-compilation-unit.h", 3496 "src/maglev/maglev-compiler.h", 3497 "src/maglev/maglev-concurrent-dispatcher.h", 3498 "src/maglev/maglev-graph-builder.h", 3499 "src/maglev/maglev-graph-labeller.h", 3500 "src/maglev/maglev-graph-printer.h", 3501 "src/maglev/maglev-graph-processor.h", 3502 "src/maglev/maglev-graph-verifier.h", 3503 "src/maglev/maglev-graph.h", 3504 "src/maglev/maglev-interpreter-frame-state.h", 3505 "src/maglev/maglev-ir.h", 3506 "src/maglev/maglev-regalloc-data.h", 3507 "src/maglev/maglev-regalloc.h", 3508 "src/maglev/maglev-register-frame-array.h", 3509 "src/maglev/maglev-vreg-allocator.h", 3510 "src/maglev/maglev.h", 3511 ] 3512 } 3513 3514 if (v8_enable_webassembly) { 3515 sources += [ 3516 "src/asmjs/asm-js.h", 3517 "src/asmjs/asm-names.h", 3518 "src/asmjs/asm-parser.h", 3519 "src/asmjs/asm-scanner.h", 3520 "src/asmjs/asm-types.h", 3521 "src/compiler/int64-lowering.h", 3522 "src/compiler/wasm-compiler.h", 3523 "src/compiler/wasm-escape-analysis.h", 3524 "src/compiler/wasm-inlining.h", 3525 "src/compiler/wasm-loop-peeling.h", 3526 "src/debug/debug-wasm-objects-inl.h", 3527 "src/debug/debug-wasm-objects.h", 3528 "src/trap-handler/trap-handler-internal.h", 3529 "src/trap-handler/trap-handler.h", 3530 "src/wasm/baseline/liftoff-assembler-defs.h", 3531 "src/wasm/baseline/liftoff-assembler.h", 3532 "src/wasm/baseline/liftoff-compiler.h", 3533 "src/wasm/baseline/liftoff-register.h", 3534 "src/wasm/canonical-types.h", 3535 "src/wasm/code-space-access.h", 3536 "src/wasm/compilation-environment.h", 3537 "src/wasm/decoder.h", 3538 "src/wasm/function-body-decoder-impl.h", 3539 "src/wasm/function-body-decoder.h", 3540 "src/wasm/function-compiler.h", 3541 "src/wasm/graph-builder-interface.h", 3542 "src/wasm/init-expr-interface.h", 3543 "src/wasm/jump-table-assembler.h", 3544 "src/wasm/leb-helper.h", 3545 "src/wasm/local-decl-encoder.h", 3546 "src/wasm/memory-protection-key.h", 3547 "src/wasm/memory-tracing.h", 3548 "src/wasm/module-compiler.h", 3549 "src/wasm/module-decoder.h", 3550 "src/wasm/module-instantiate.h", 3551 "src/wasm/object-access.h", 3552 "src/wasm/signature-map.h", 3553 "src/wasm/simd-shuffle.h", 3554 "src/wasm/stacks.h", 3555 "src/wasm/streaming-decoder.h", 3556 "src/wasm/struct-types.h", 3557 "src/wasm/value-type.h", 3558 "src/wasm/wasm-arguments.h", 3559 "src/wasm/wasm-code-manager.h", 3560 "src/wasm/wasm-engine.h", 3561 "src/wasm/wasm-external-refs.h", 3562 "src/wasm/wasm-feature-flags.h", 3563 "src/wasm/wasm-features.h", 3564 "src/wasm/wasm-import-wrapper-cache.h", 3565 "src/wasm/wasm-init-expr.h", 3566 "src/wasm/wasm-js.h", 3567 "src/wasm/wasm-linkage.h", 3568 "src/wasm/wasm-module-builder.h", 3569 "src/wasm/wasm-module-sourcemap.h", 3570 "src/wasm/wasm-module.h", 3571 "src/wasm/wasm-objects-inl.h", 3572 "src/wasm/wasm-objects.h", 3573 "src/wasm/wasm-opcodes-inl.h", 3574 "src/wasm/wasm-opcodes.h", 3575 "src/wasm/wasm-result.h", 3576 "src/wasm/wasm-serialization.h", 3577 "src/wasm/wasm-subtyping.h", 3578 "src/wasm/wasm-tier.h", 3579 "src/wasm/wasm-value.h", 3580 ] 3581 } 3582 3583 if (!v8_enable_third_party_heap) { 3584 sources += filter_include(v8_third_party_heap_files, [ "*.h" ]) 3585 } else { 3586 sources += [ "src/heap/third-party/heap-api.h" ] 3587 } 3588 3589 if (v8_enable_i18n_support) { 3590 sources += [ 3591 "src/objects/intl-objects.h", 3592 "src/objects/js-break-iterator-inl.h", 3593 "src/objects/js-break-iterator.h", 3594 "src/objects/js-collator-inl.h", 3595 "src/objects/js-collator.h", 3596 "src/objects/js-date-time-format-inl.h", 3597 "src/objects/js-date-time-format.h", 3598 "src/objects/js-display-names-inl.h", 3599 "src/objects/js-display-names.h", 3600 "src/objects/js-list-format-inl.h", 3601 "src/objects/js-list-format.h", 3602 "src/objects/js-locale-inl.h", 3603 "src/objects/js-locale.h", 3604 "src/objects/js-number-format-inl.h", 3605 "src/objects/js-number-format.h", 3606 "src/objects/js-plural-rules-inl.h", 3607 "src/objects/js-plural-rules.h", 3608 "src/objects/js-relative-time-format-inl.h", 3609 "src/objects/js-relative-time-format.h", 3610 "src/objects/js-segment-iterator-inl.h", 3611 "src/objects/js-segment-iterator.h", 3612 "src/objects/js-segmenter-inl.h", 3613 "src/objects/js-segmenter.h", 3614 "src/objects/js-segments-inl.h", 3615 "src/objects/js-segments.h", 3616 ] 3617 } 3618 3619 if (!v8_control_flow_integrity) { 3620 sources += [ "src/execution/pointer-authentication-dummy.h" ] 3621 } 3622 3623 if (v8_enable_conservative_stack_scanning) { 3624 sources += [ 3625 "src/heap/conservative-stack-visitor.h", 3626 "src/heap/object-start-bitmap.h", 3627 ] 3628 } 3629 3630 if (v8_enable_wasm_gdb_remote_debugging) { 3631 sources += [ 3632 "src/debug/wasm/gdb-server/gdb-remote-util.h", 3633 "src/debug/wasm/gdb-server/gdb-server-thread.h", 3634 "src/debug/wasm/gdb-server/gdb-server.h", 3635 "src/debug/wasm/gdb-server/packet.h", 3636 "src/debug/wasm/gdb-server/session.h", 3637 "src/debug/wasm/gdb-server/target.h", 3638 "src/debug/wasm/gdb-server/transport.h", 3639 "src/debug/wasm/gdb-server/wasm-module-debug.h", 3640 ] 3641 } 3642 3643 if (v8_enable_heap_snapshot_verify) { 3644 sources += [ "src/heap/reference-summarizer.h" ] 3645 } 3646 3647 if (v8_current_cpu == "x86") { 3648 sources += [ ### gcmole(arch:ia32) ### 3649 "src/baseline/ia32/baseline-assembler-ia32-inl.h", 3650 "src/baseline/ia32/baseline-compiler-ia32-inl.h", 3651 "src/codegen/ia32/assembler-ia32-inl.h", 3652 "src/codegen/ia32/assembler-ia32.h", 3653 "src/codegen/ia32/constants-ia32.h", 3654 "src/codegen/ia32/interface-descriptors-ia32-inl.h", 3655 "src/codegen/ia32/macro-assembler-ia32.h", 3656 "src/codegen/ia32/register-ia32.h", 3657 "src/codegen/ia32/reglist-ia32.h", 3658 "src/codegen/ia32/sse-instr.h", 3659 "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", 3660 "src/compiler/backend/ia32/instruction-codes-ia32.h", 3661 "src/execution/ia32/frame-constants-ia32.h", 3662 "src/regexp/ia32/regexp-macro-assembler-ia32.h", 3663 "src/wasm/baseline/ia32/liftoff-assembler-ia32.h", 3664 ] 3665 } else if (v8_current_cpu == "x64") { 3666 sources += [ ### gcmole(arch:x64) ### 3667 "src/baseline/x64/baseline-assembler-x64-inl.h", 3668 "src/baseline/x64/baseline-compiler-x64-inl.h", 3669 "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", 3670 "src/codegen/x64/assembler-x64-inl.h", 3671 "src/codegen/x64/assembler-x64.h", 3672 "src/codegen/x64/constants-x64.h", 3673 "src/codegen/x64/fma-instr.h", 3674 "src/codegen/x64/interface-descriptors-x64-inl.h", 3675 "src/codegen/x64/macro-assembler-x64.h", 3676 "src/codegen/x64/register-x64.h", 3677 "src/codegen/x64/reglist-x64.h", 3678 "src/codegen/x64/sse-instr.h", 3679 "src/compiler/backend/x64/instruction-codes-x64.h", 3680 "src/compiler/backend/x64/unwinding-info-writer-x64.h", 3681 "src/execution/x64/frame-constants-x64.h", 3682 "src/regexp/x64/regexp-macro-assembler-x64.h", 3683 "src/third_party/valgrind/valgrind.h", 3684 "src/wasm/baseline/x64/liftoff-assembler-x64.h", 3685 ] 3686 3687 if (is_win) { 3688 sources += [ "src/diagnostics/unwinding-info-win64.h" ] 3689 } 3690 3691 if (v8_enable_webassembly) { 3692 # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both 3693 # based on Darwin and thus POSIX-compliant to a similar degree. 3694 if (is_linux || is_chromeos || is_mac || is_ios || 3695 target_os == "freebsd") { 3696 sources += [ "src/trap-handler/handler-inside-posix.h" ] 3697 } else if (is_win) { 3698 sources += [ "src/trap-handler/handler-inside-win.h" ] 3699 } 3700 } 3701 } else if (v8_current_cpu == "arm") { 3702 sources += [ ### gcmole(arch:arm) ### 3703 "src/baseline/arm/baseline-assembler-arm-inl.h", 3704 "src/baseline/arm/baseline-compiler-arm-inl.h", 3705 "src/codegen/arm/assembler-arm-inl.h", 3706 "src/codegen/arm/assembler-arm.h", 3707 "src/codegen/arm/constants-arm.h", 3708 "src/codegen/arm/interface-descriptors-arm-inl.h", 3709 "src/codegen/arm/macro-assembler-arm.h", 3710 "src/codegen/arm/register-arm.h", 3711 "src/codegen/arm/reglist-arm.h", 3712 "src/compiler/backend/arm/instruction-codes-arm.h", 3713 "src/compiler/backend/arm/unwinding-info-writer-arm.h", 3714 "src/execution/arm/frame-constants-arm.h", 3715 "src/execution/arm/simulator-arm.h", 3716 "src/regexp/arm/regexp-macro-assembler-arm.h", 3717 "src/wasm/baseline/arm/liftoff-assembler-arm.h", 3718 ] 3719 } else if (v8_current_cpu == "arm64") { 3720 sources += [ ### gcmole(arch:arm64) ### 3721 "src/baseline/arm64/baseline-assembler-arm64-inl.h", 3722 "src/baseline/arm64/baseline-compiler-arm64-inl.h", 3723 "src/codegen/arm64/assembler-arm64-inl.h", 3724 "src/codegen/arm64/assembler-arm64.h", 3725 "src/codegen/arm64/constants-arm64.h", 3726 "src/codegen/arm64/decoder-arm64-inl.h", 3727 "src/codegen/arm64/decoder-arm64.h", 3728 "src/codegen/arm64/instructions-arm64.h", 3729 "src/codegen/arm64/interface-descriptors-arm64-inl.h", 3730 "src/codegen/arm64/macro-assembler-arm64-inl.h", 3731 "src/codegen/arm64/macro-assembler-arm64.h", 3732 "src/codegen/arm64/register-arm64.h", 3733 "src/codegen/arm64/reglist-arm64.h", 3734 "src/codegen/arm64/utils-arm64.h", 3735 "src/compiler/backend/arm64/instruction-codes-arm64.h", 3736 "src/compiler/backend/arm64/unwinding-info-writer-arm64.h", 3737 "src/diagnostics/arm64/disasm-arm64.h", 3738 "src/execution/arm64/frame-constants-arm64.h", 3739 "src/execution/arm64/simulator-arm64.h", 3740 "src/regexp/arm64/regexp-macro-assembler-arm64.h", 3741 "src/wasm/baseline/arm64/liftoff-assembler-arm64.h", 3742 ] 3743 if (v8_control_flow_integrity) { 3744 sources += [ "src/execution/arm64/pointer-authentication-arm64.h" ] 3745 } 3746 if (v8_enable_webassembly) { 3747 # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux 3748 # and Mac. 3749 if ((current_cpu == "arm64" && is_mac) || 3750 (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { 3751 sources += [ "src/trap-handler/handler-inside-posix.h" ] 3752 } 3753 if (current_cpu == "x64" && 3754 (is_linux || is_chromeos || is_mac || is_win)) { 3755 sources += [ "src/trap-handler/trap-handler-simulator.h" ] 3756 } 3757 } 3758 if (is_win) { 3759 sources += [ "src/diagnostics/unwinding-info-win64.h" ] 3760 } 3761 } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { 3762 sources += [ ### gcmole(arch:mipsel) ### 3763 "src/baseline/mips/baseline-assembler-mips-inl.h", 3764 "src/baseline/mips/baseline-compiler-mips-inl.h", 3765 "src/codegen/mips/assembler-mips-inl.h", 3766 "src/codegen/mips/assembler-mips.h", 3767 "src/codegen/mips/constants-mips.h", 3768 "src/codegen/mips/macro-assembler-mips.h", 3769 "src/codegen/mips/register-mips.h", 3770 "src/codegen/mips/reglist-mips.h", 3771 "src/compiler/backend/mips/instruction-codes-mips.h", 3772 "src/execution/mips/frame-constants-mips.h", 3773 "src/execution/mips/simulator-mips.h", 3774 "src/regexp/mips/regexp-macro-assembler-mips.h", 3775 "src/wasm/baseline/mips/liftoff-assembler-mips.h", 3776 ] 3777 } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { 3778 sources += [ ### gcmole(arch:mips64el) ### 3779 "src/baseline/mips64/baseline-assembler-mips64-inl.h", 3780 "src/baseline/mips64/baseline-compiler-mips64-inl.h", 3781 "src/codegen/mips64/assembler-mips64-inl.h", 3782 "src/codegen/mips64/assembler-mips64.h", 3783 "src/codegen/mips64/constants-mips64.h", 3784 "src/codegen/mips64/macro-assembler-mips64.h", 3785 "src/codegen/mips64/register-mips64.h", 3786 "src/codegen/mips64/reglist-mips64.h", 3787 "src/compiler/backend/mips64/instruction-codes-mips64.h", 3788 "src/execution/mips64/frame-constants-mips64.h", 3789 "src/execution/mips64/simulator-mips64.h", 3790 "src/regexp/mips64/regexp-macro-assembler-mips64.h", 3791 "src/wasm/baseline/mips64/liftoff-assembler-mips64.h", 3792 ] 3793 } else if (v8_current_cpu == "loong64") { 3794 sources += [ ### gcmole(arch:loong64) ### 3795 "src/baseline/loong64/baseline-assembler-loong64-inl.h", 3796 "src/baseline/loong64/baseline-compiler-loong64-inl.h", 3797 "src/codegen/loong64/assembler-loong64-inl.h", 3798 "src/codegen/loong64/assembler-loong64.h", 3799 "src/codegen/loong64/constants-loong64.h", 3800 "src/codegen/loong64/macro-assembler-loong64.h", 3801 "src/codegen/loong64/register-loong64.h", 3802 "src/codegen/loong64/reglist-loong64.h", 3803 "src/compiler/backend/loong64/instruction-codes-loong64.h", 3804 "src/execution/loong64/frame-constants-loong64.h", 3805 "src/execution/loong64/simulator-loong64.h", 3806 "src/regexp/loong64/regexp-macro-assembler-loong64.h", 3807 "src/wasm/baseline/loong64/liftoff-assembler-loong64.h", 3808 ] 3809 } else if (v8_current_cpu == "ppc") { 3810 sources += [ ### gcmole(arch:ppc) ### 3811 "src/codegen/ppc/assembler-ppc-inl.h", 3812 "src/codegen/ppc/assembler-ppc.h", 3813 "src/codegen/ppc/constants-ppc.h", 3814 "src/codegen/ppc/interface-descriptors-ppc-inl.h", 3815 "src/codegen/ppc/macro-assembler-ppc.h", 3816 "src/codegen/ppc/register-ppc.h", 3817 "src/codegen/ppc/reglist-ppc.h", 3818 "src/compiler/backend/ppc/instruction-codes-ppc.h", 3819 "src/compiler/backend/ppc/unwinding-info-writer-ppc.h", 3820 "src/execution/ppc/frame-constants-ppc.h", 3821 "src/execution/ppc/simulator-ppc.h", 3822 "src/regexp/ppc/regexp-macro-assembler-ppc.h", 3823 "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", 3824 ] 3825 } else if (v8_current_cpu == "ppc64") { 3826 sources += [ ### gcmole(arch:ppc64) ### 3827 "src/baseline/ppc/baseline-assembler-ppc-inl.h", 3828 "src/baseline/ppc/baseline-compiler-ppc-inl.h", 3829 "src/codegen/ppc/assembler-ppc-inl.h", 3830 "src/codegen/ppc/assembler-ppc.h", 3831 "src/codegen/ppc/constants-ppc.h", 3832 "src/codegen/ppc/interface-descriptors-ppc-inl.h", 3833 "src/codegen/ppc/macro-assembler-ppc.h", 3834 "src/codegen/ppc/register-ppc.h", 3835 "src/codegen/ppc/reglist-ppc.h", 3836 "src/compiler/backend/ppc/instruction-codes-ppc.h", 3837 "src/compiler/backend/ppc/unwinding-info-writer-ppc.h", 3838 "src/execution/ppc/frame-constants-ppc.h", 3839 "src/execution/ppc/simulator-ppc.h", 3840 "src/regexp/ppc/regexp-macro-assembler-ppc.h", 3841 "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", 3842 ] 3843 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 3844 sources += [ ### gcmole(arch:s390) ### 3845 "src/baseline/s390/baseline-assembler-s390-inl.h", 3846 "src/baseline/s390/baseline-compiler-s390-inl.h", 3847 "src/codegen/s390/assembler-s390-inl.h", 3848 "src/codegen/s390/assembler-s390.h", 3849 "src/codegen/s390/constants-s390.h", 3850 "src/codegen/s390/interface-descriptors-s390-inl.h", 3851 "src/codegen/s390/macro-assembler-s390.h", 3852 "src/codegen/s390/register-s390.h", 3853 "src/codegen/s390/reglist-s390.h", 3854 "src/compiler/backend/s390/instruction-codes-s390.h", 3855 "src/compiler/backend/s390/unwinding-info-writer-s390.h", 3856 "src/execution/s390/frame-constants-s390.h", 3857 "src/execution/s390/simulator-s390.h", 3858 "src/regexp/s390/regexp-macro-assembler-s390.h", 3859 "src/wasm/baseline/s390/liftoff-assembler-s390.h", 3860 ] 3861 } else if (v8_current_cpu == "riscv64") { 3862 sources += [ ### gcmole(arch:riscv64) ### 3863 "src/baseline/riscv64/baseline-assembler-riscv64-inl.h", 3864 "src/baseline/riscv64/baseline-compiler-riscv64-inl.h", 3865 "src/codegen/riscv64/assembler-riscv64-inl.h", 3866 "src/codegen/riscv64/assembler-riscv64.h", 3867 "src/codegen/riscv64/constants-riscv64.h", 3868 "src/codegen/riscv64/macro-assembler-riscv64.h", 3869 "src/codegen/riscv64/register-riscv64.h", 3870 "src/codegen/riscv64/reglist-riscv64.h", 3871 "src/compiler/backend/riscv64/instruction-codes-riscv64.h", 3872 "src/execution/riscv64/frame-constants-riscv64.h", 3873 "src/execution/riscv64/simulator-riscv64.h", 3874 "src/regexp/riscv64/regexp-macro-assembler-riscv64.h", 3875 "src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h", 3876 ] 3877 } 3878 3879 public_deps = [ 3880 ":torque_runtime_support", 3881 ":v8_flags", 3882 ":v8_headers", 3883 ":v8_maybe_icu", 3884 ":v8_shared_internal_headers", 3885 ] 3886 3887 deps = [ 3888 ":cppgc_headers", 3889 ":generate_bytecode_builtins_list", 3890 ":run_torque", 3891 ":v8_heap_base_headers", 3892 ":v8_libbase", 3893 ] 3894} 3895 3896v8_compiler_sources = [ 3897 ### gcmole(all) ### 3898 "src/compiler/access-builder.cc", 3899 "src/compiler/access-info.cc", 3900 "src/compiler/add-type-assertions-reducer.cc", 3901 "src/compiler/all-nodes.cc", 3902 "src/compiler/backend/code-generator.cc", 3903 "src/compiler/backend/frame-elider.cc", 3904 "src/compiler/backend/gap-resolver.cc", 3905 "src/compiler/backend/instruction-scheduler.cc", 3906 "src/compiler/backend/instruction-selector.cc", 3907 "src/compiler/backend/instruction.cc", 3908 "src/compiler/backend/jump-threading.cc", 3909 "src/compiler/backend/mid-tier-register-allocator.cc", 3910 "src/compiler/backend/move-optimizer.cc", 3911 "src/compiler/backend/register-allocator-verifier.cc", 3912 "src/compiler/backend/register-allocator.cc", 3913 "src/compiler/backend/spill-placer.cc", 3914 "src/compiler/basic-block-instrumentor.cc", 3915 "src/compiler/branch-condition-duplicator.cc", 3916 "src/compiler/branch-elimination.cc", 3917 "src/compiler/bytecode-analysis.cc", 3918 "src/compiler/bytecode-graph-builder.cc", 3919 "src/compiler/bytecode-liveness-map.cc", 3920 "src/compiler/c-linkage.cc", 3921 "src/compiler/checkpoint-elimination.cc", 3922 "src/compiler/code-assembler.cc", 3923 "src/compiler/common-node-cache.cc", 3924 "src/compiler/common-operator-reducer.cc", 3925 "src/compiler/common-operator.cc", 3926 "src/compiler/compilation-dependencies.cc", 3927 "src/compiler/compiler-source-position-table.cc", 3928 "src/compiler/constant-folding-reducer.cc", 3929 "src/compiler/control-equivalence.cc", 3930 "src/compiler/control-flow-optimizer.cc", 3931 "src/compiler/csa-load-elimination.cc", 3932 "src/compiler/dead-code-elimination.cc", 3933 "src/compiler/decompression-optimizer.cc", 3934 "src/compiler/effect-control-linearizer.cc", 3935 "src/compiler/escape-analysis-reducer.cc", 3936 "src/compiler/escape-analysis.cc", 3937 "src/compiler/fast-api-calls.cc", 3938 "src/compiler/feedback-source.cc", 3939 "src/compiler/frame-states.cc", 3940 "src/compiler/frame.cc", 3941 "src/compiler/graph-assembler.cc", 3942 "src/compiler/graph-reducer.cc", 3943 "src/compiler/graph-trimmer.cc", 3944 "src/compiler/graph-visualizer.cc", 3945 "src/compiler/graph.cc", 3946 "src/compiler/heap-refs.cc", 3947 "src/compiler/js-call-reducer.cc", 3948 "src/compiler/js-context-specialization.cc", 3949 "src/compiler/js-create-lowering.cc", 3950 "src/compiler/js-generic-lowering.cc", 3951 "src/compiler/js-graph.cc", 3952 "src/compiler/js-heap-broker.cc", 3953 "src/compiler/js-inlining-heuristic.cc", 3954 "src/compiler/js-inlining.cc", 3955 "src/compiler/js-intrinsic-lowering.cc", 3956 "src/compiler/js-native-context-specialization.cc", 3957 "src/compiler/js-operator.cc", 3958 "src/compiler/js-type-hint-lowering.cc", 3959 "src/compiler/js-typed-lowering.cc", 3960 "src/compiler/linkage.cc", 3961 "src/compiler/load-elimination.cc", 3962 "src/compiler/loop-analysis.cc", 3963 "src/compiler/loop-peeling.cc", 3964 "src/compiler/loop-unrolling.cc", 3965 "src/compiler/loop-variable-optimizer.cc", 3966 "src/compiler/machine-graph-verifier.cc", 3967 "src/compiler/machine-graph.cc", 3968 "src/compiler/machine-operator-reducer.cc", 3969 "src/compiler/machine-operator.cc", 3970 "src/compiler/map-inference.cc", 3971 "src/compiler/memory-lowering.cc", 3972 "src/compiler/memory-optimizer.cc", 3973 "src/compiler/node-marker.cc", 3974 "src/compiler/node-matchers.cc", 3975 "src/compiler/node-observer.cc", 3976 "src/compiler/node-origin-table.cc", 3977 "src/compiler/node-properties.cc", 3978 "src/compiler/node.cc", 3979 "src/compiler/opcodes.cc", 3980 "src/compiler/operation-typer.cc", 3981 "src/compiler/operator-properties.cc", 3982 "src/compiler/operator.cc", 3983 "src/compiler/osr.cc", 3984 "src/compiler/pipeline-statistics.cc", 3985 "src/compiler/pipeline.cc", 3986 "src/compiler/property-access-builder.cc", 3987 "src/compiler/raw-machine-assembler.cc", 3988 "src/compiler/redundancy-elimination.cc", 3989 "src/compiler/refs-map.cc", 3990 "src/compiler/representation-change.cc", 3991 "src/compiler/schedule.cc", 3992 "src/compiler/scheduler.cc", 3993 "src/compiler/select-lowering.cc", 3994 "src/compiler/simplified-lowering-verifier.cc", 3995 "src/compiler/simplified-lowering.cc", 3996 "src/compiler/simplified-operator-reducer.cc", 3997 "src/compiler/simplified-operator.cc", 3998 "src/compiler/state-values-utils.cc", 3999 "src/compiler/store-store-elimination.cc", 4000 "src/compiler/type-cache.cc", 4001 "src/compiler/type-narrowing-reducer.cc", 4002 "src/compiler/typed-optimization.cc", 4003 "src/compiler/typer.cc", 4004 "src/compiler/types.cc", 4005 "src/compiler/value-numbering-reducer.cc", 4006 "src/compiler/verifier.cc", 4007 "src/compiler/zone-stats.cc", 4008] 4009 4010if (v8_enable_webassembly) { 4011 v8_compiler_sources += [ 4012 "src/compiler/int64-lowering.cc", 4013 "src/compiler/wasm-compiler.cc", 4014 "src/compiler/wasm-escape-analysis.cc", 4015 "src/compiler/wasm-inlining.cc", 4016 "src/compiler/wasm-loop-peeling.cc", 4017 ] 4018} 4019 4020# The src/compiler files with optimizations. 4021v8_source_set("v8_compiler_opt") { 4022 visibility = [ ":*" ] # Only targets in this file can depend on this. 4023 4024 sources = v8_compiler_sources 4025 4026 public_deps = [ 4027 ":generate_bytecode_builtins_list", 4028 ":run_torque", 4029 ":v8_maybe_icu", 4030 ":v8_tracing", 4031 ] 4032 4033 deps = [ 4034 ":v8_base_without_compiler", 4035 ":v8_internal_headers", 4036 ":v8_libbase", 4037 ":v8_shared_internal_headers", 4038 ] 4039 4040 if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { 4041 # The :no_optimize config is added to v8_add_configs in v8.gni. 4042 remove_configs = [ "//build/config/compiler:no_optimize" ] 4043 configs = [ ":always_optimize" ] 4044 } else { 4045 # Without this else branch, gn fails to generate build files for non-debug 4046 # builds (because we try to remove a config that is not present). 4047 # So we include it, even if this config is not used outside of debug builds. 4048 configs = [ ":internal_config" ] 4049 } 4050} 4051 4052# The src/compiler files with default optimization behavior. 4053v8_source_set("v8_compiler") { 4054 visibility = [ ":*" ] # Only targets in this file can depend on this. 4055 4056 sources = v8_compiler_sources 4057 4058 public_deps = [ 4059 ":generate_bytecode_builtins_list", 4060 ":run_torque", 4061 ":v8_internal_headers", 4062 ":v8_maybe_icu", 4063 ":v8_tracing", 4064 ] 4065 4066 deps = [ 4067 ":v8_base_without_compiler", 4068 ":v8_libbase", 4069 ":v8_shared_internal_headers", 4070 ] 4071 4072 configs = [ ":internal_config" ] 4073} 4074 4075group("v8_compiler_for_mksnapshot") { 4076 if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { 4077 deps = [ ":v8_compiler_opt" ] 4078 } else { 4079 deps = [ ":v8_compiler" ] 4080 } 4081} 4082 4083# Any target using trace events must directly or indirectly depend on 4084# v8_tracing. 4085group("v8_tracing") { 4086 if (v8_use_perfetto) { 4087 if (build_with_chromium) { 4088 public_deps = [ "//third_party/perfetto:libperfetto" ] 4089 } else { 4090 public_deps = [ ":v8_libperfetto" ] 4091 } 4092 } 4093} 4094 4095v8_source_set("v8_base_without_compiler") { 4096 visibility = [ ":*" ] # Only targets in this file can depend on this. 4097 4098 # Split static libraries on windows into two. 4099 split_count = 2 4100 4101 sources = [ 4102 ### gcmole(all) ### 4103 "src/api/api-arguments.cc", 4104 "src/api/api-natives.cc", 4105 "src/api/api.cc", 4106 "src/ast/ast-function-literal-id-reindexer.cc", 4107 "src/ast/ast-value-factory.cc", 4108 "src/ast/ast.cc", 4109 "src/ast/modules.cc", 4110 "src/ast/prettyprinter.cc", 4111 "src/ast/scopes.cc", 4112 "src/ast/source-range-ast-visitor.cc", 4113 "src/ast/variables.cc", 4114 "src/baseline/baseline-batch-compiler.cc", 4115 "src/baseline/baseline-compiler.cc", 4116 "src/baseline/baseline.cc", 4117 "src/baseline/bytecode-offset-iterator.cc", 4118 "src/builtins/accessors.cc", 4119 "src/builtins/builtins-api.cc", 4120 "src/builtins/builtins-array.cc", 4121 "src/builtins/builtins-arraybuffer.cc", 4122 "src/builtins/builtins-async-module.cc", 4123 "src/builtins/builtins-bigint.cc", 4124 "src/builtins/builtins-callsite.cc", 4125 "src/builtins/builtins-collections.cc", 4126 "src/builtins/builtins-console.cc", 4127 "src/builtins/builtins-dataview.cc", 4128 "src/builtins/builtins-date.cc", 4129 "src/builtins/builtins-error.cc", 4130 "src/builtins/builtins-function.cc", 4131 "src/builtins/builtins-global.cc", 4132 "src/builtins/builtins-internal.cc", 4133 "src/builtins/builtins-intl.cc", 4134 "src/builtins/builtins-json.cc", 4135 "src/builtins/builtins-number.cc", 4136 "src/builtins/builtins-object.cc", 4137 "src/builtins/builtins-reflect.cc", 4138 "src/builtins/builtins-regexp.cc", 4139 "src/builtins/builtins-shadow-realms.cc", 4140 "src/builtins/builtins-sharedarraybuffer.cc", 4141 "src/builtins/builtins-string.cc", 4142 "src/builtins/builtins-struct.cc", 4143 "src/builtins/builtins-symbol.cc", 4144 "src/builtins/builtins-temporal.cc", 4145 "src/builtins/builtins-trace.cc", 4146 "src/builtins/builtins-typed-array.cc", 4147 "src/builtins/builtins-weak-refs.cc", 4148 "src/builtins/builtins.cc", 4149 "src/builtins/constants-table-builder.cc", 4150 "src/codegen/aligned-slot-allocator.cc", 4151 "src/codegen/assembler.cc", 4152 "src/codegen/bailout-reason.cc", 4153 "src/codegen/code-comments.cc", 4154 "src/codegen/code-desc.cc", 4155 "src/codegen/code-factory.cc", 4156 "src/codegen/code-reference.cc", 4157 "src/codegen/compilation-cache.cc", 4158 "src/codegen/compiler.cc", 4159 "src/codegen/constant-pool.cc", 4160 "src/codegen/external-reference-encoder.cc", 4161 "src/codegen/external-reference-table.cc", 4162 "src/codegen/external-reference.cc", 4163 "src/codegen/flush-instruction-cache.cc", 4164 "src/codegen/handler-table.cc", 4165 "src/codegen/interface-descriptors.cc", 4166 "src/codegen/machine-type.cc", 4167 "src/codegen/optimized-compilation-info.cc", 4168 "src/codegen/pending-optimization-table.cc", 4169 "src/codegen/register-configuration.cc", 4170 "src/codegen/reloc-info.cc", 4171 "src/codegen/safepoint-table.cc", 4172 "src/codegen/source-position-table.cc", 4173 "src/codegen/source-position.cc", 4174 "src/codegen/string-constants.cc", 4175 "src/codegen/tick-counter.cc", 4176 "src/codegen/tnode.cc", 4177 "src/codegen/turbo-assembler.cc", 4178 "src/codegen/unoptimized-compilation-info.cc", 4179 "src/common/assert-scope.cc", 4180 "src/compiler-dispatcher/lazy-compile-dispatcher.cc", 4181 "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", 4182 "src/date/date.cc", 4183 "src/date/dateparser.cc", 4184 "src/debug/debug-coverage.cc", 4185 "src/debug/debug-evaluate.cc", 4186 "src/debug/debug-frames.cc", 4187 "src/debug/debug-interface.cc", 4188 "src/debug/debug-property-iterator.cc", 4189 "src/debug/debug-scope-iterator.cc", 4190 "src/debug/debug-scopes.cc", 4191 "src/debug/debug-stack-trace-iterator.cc", 4192 "src/debug/debug-type-profile.cc", 4193 "src/debug/debug.cc", 4194 "src/debug/liveedit.cc", 4195 "src/deoptimizer/deoptimize-reason.cc", 4196 "src/deoptimizer/deoptimized-frame-info.cc", 4197 "src/deoptimizer/deoptimizer.cc", 4198 "src/deoptimizer/materialized-object-store.cc", 4199 "src/deoptimizer/translated-state.cc", 4200 "src/deoptimizer/translation-array.cc", 4201 "src/diagnostics/basic-block-profiler.cc", 4202 "src/diagnostics/compilation-statistics.cc", 4203 "src/diagnostics/disassembler.cc", 4204 "src/diagnostics/eh-frame.cc", 4205 "src/diagnostics/gdb-jit.cc", 4206 "src/diagnostics/objects-debug.cc", 4207 "src/diagnostics/objects-printer.cc", 4208 "src/diagnostics/perf-jit.cc", 4209 "src/diagnostics/unwinder.cc", 4210 "src/execution/arguments.cc", 4211 "src/execution/clobber-registers.cc", 4212 "src/execution/embedder-state.cc", 4213 "src/execution/encoded-c-signature.cc", 4214 "src/execution/execution.cc", 4215 "src/execution/frames.cc", 4216 "src/execution/futex-emulation.cc", 4217 "src/execution/interrupts-scope.cc", 4218 "src/execution/isolate.cc", 4219 "src/execution/local-isolate.cc", 4220 "src/execution/messages.cc", 4221 "src/execution/microtask-queue.cc", 4222 "src/execution/protectors.cc", 4223 "src/execution/simulator-base.cc", 4224 "src/execution/stack-guard.cc", 4225 "src/execution/thread-id.cc", 4226 "src/execution/thread-local-top.cc", 4227 "src/execution/tiering-manager.cc", 4228 "src/execution/v8threads.cc", 4229 "src/extensions/cputracemark-extension.cc", 4230 "src/extensions/externalize-string-extension.cc", 4231 "src/extensions/gc-extension.cc", 4232 "src/extensions/ignition-statistics-extension.cc", 4233 "src/extensions/statistics-extension.cc", 4234 "src/extensions/trigger-failure-extension.cc", 4235 "src/flags/flags.cc", 4236 "src/handles/global-handles.cc", 4237 "src/handles/handles.cc", 4238 "src/handles/local-handles.cc", 4239 "src/handles/persistent-handles.cc", 4240 "src/heap/allocation-observer.cc", 4241 "src/heap/array-buffer-sweeper.cc", 4242 "src/heap/base-space.cc", 4243 "src/heap/basic-memory-chunk.cc", 4244 "src/heap/code-object-registry.cc", 4245 "src/heap/code-range.cc", 4246 "src/heap/code-stats.cc", 4247 "src/heap/collection-barrier.cc", 4248 "src/heap/combined-heap.cc", 4249 "src/heap/concurrent-allocator.cc", 4250 "src/heap/concurrent-marking.cc", 4251 "src/heap/cppgc-js/cpp-heap.cc", 4252 "src/heap/cppgc-js/cpp-snapshot.cc", 4253 "src/heap/cppgc-js/unified-heap-marking-state.cc", 4254 "src/heap/cppgc-js/unified-heap-marking-verifier.cc", 4255 "src/heap/cppgc-js/unified-heap-marking-visitor.cc", 4256 "src/heap/embedder-tracing.cc", 4257 "src/heap/factory-base.cc", 4258 "src/heap/factory.cc", 4259 "src/heap/finalization-registry-cleanup-task.cc", 4260 "src/heap/free-list.cc", 4261 "src/heap/gc-idle-time-handler.cc", 4262 "src/heap/gc-tracer.cc", 4263 "src/heap/heap-allocator.cc", 4264 "src/heap/heap-controller.cc", 4265 "src/heap/heap-layout-tracer.cc", 4266 "src/heap/heap-write-barrier.cc", 4267 "src/heap/heap.cc", 4268 "src/heap/incremental-marking-job.cc", 4269 "src/heap/incremental-marking.cc", 4270 "src/heap/index-generator.cc", 4271 "src/heap/invalidated-slots.cc", 4272 "src/heap/large-spaces.cc", 4273 "src/heap/local-factory.cc", 4274 "src/heap/local-heap.cc", 4275 "src/heap/mark-compact.cc", 4276 "src/heap/marking-barrier.cc", 4277 "src/heap/marking-worklist.cc", 4278 "src/heap/marking.cc", 4279 "src/heap/memory-allocator.cc", 4280 "src/heap/memory-chunk-layout.cc", 4281 "src/heap/memory-chunk.cc", 4282 "src/heap/memory-measurement.cc", 4283 "src/heap/memory-reducer.cc", 4284 "src/heap/new-spaces.cc", 4285 "src/heap/object-stats.cc", 4286 "src/heap/objects-visiting.cc", 4287 "src/heap/paged-spaces.cc", 4288 "src/heap/read-only-heap.cc", 4289 "src/heap/read-only-spaces.cc", 4290 "src/heap/safepoint.cc", 4291 "src/heap/scavenge-job.cc", 4292 "src/heap/scavenger.cc", 4293 "src/heap/slot-set.cc", 4294 "src/heap/spaces.cc", 4295 "src/heap/stress-marking-observer.cc", 4296 "src/heap/stress-scavenge-observer.cc", 4297 "src/heap/sweeper.cc", 4298 "src/heap/weak-object-worklists.cc", 4299 "src/ic/call-optimization.cc", 4300 "src/ic/handler-configuration.cc", 4301 "src/ic/ic-stats.cc", 4302 "src/ic/ic.cc", 4303 "src/ic/stub-cache.cc", 4304 "src/init/bootstrapper.cc", 4305 "src/init/icu_util.cc", 4306 "src/init/isolate-allocator.cc", 4307 "src/init/startup-data-util.cc", 4308 "src/init/v8.cc", 4309 "src/interpreter/bytecode-array-builder.cc", 4310 "src/interpreter/bytecode-array-iterator.cc", 4311 "src/interpreter/bytecode-array-random-iterator.cc", 4312 "src/interpreter/bytecode-array-writer.cc", 4313 "src/interpreter/bytecode-decoder.cc", 4314 "src/interpreter/bytecode-flags.cc", 4315 "src/interpreter/bytecode-generator.cc", 4316 "src/interpreter/bytecode-label.cc", 4317 "src/interpreter/bytecode-node.cc", 4318 "src/interpreter/bytecode-operands.cc", 4319 "src/interpreter/bytecode-register-optimizer.cc", 4320 "src/interpreter/bytecode-register.cc", 4321 "src/interpreter/bytecode-source-info.cc", 4322 "src/interpreter/bytecodes.cc", 4323 "src/interpreter/constant-array-builder.cc", 4324 "src/interpreter/control-flow-builders.cc", 4325 "src/interpreter/handler-table-builder.cc", 4326 "src/interpreter/interpreter-intrinsics.cc", 4327 "src/interpreter/interpreter.cc", 4328 "src/json/json-parser.cc", 4329 "src/json/json-stringifier.cc", 4330 "src/libsampler/sampler.cc", 4331 "src/logging/counters.cc", 4332 "src/logging/local-logger.cc", 4333 "src/logging/log-utils.cc", 4334 "src/logging/log.cc", 4335 "src/logging/metrics.cc", 4336 "src/logging/runtime-call-stats.cc", 4337 "src/logging/tracing-flags.cc", 4338 "src/numbers/conversions.cc", 4339 "src/numbers/math-random.cc", 4340 "src/objects/backing-store.cc", 4341 "src/objects/bigint.cc", 4342 "src/objects/call-site-info.cc", 4343 "src/objects/code-kind.cc", 4344 "src/objects/code.cc", 4345 "src/objects/compilation-cache-table.cc", 4346 "src/objects/contexts.cc", 4347 "src/objects/debug-objects.cc", 4348 "src/objects/elements-kind.cc", 4349 "src/objects/elements.cc", 4350 "src/objects/embedder-data-array.cc", 4351 "src/objects/feedback-vector.cc", 4352 "src/objects/field-type.cc", 4353 "src/objects/intl-objects.cc", 4354 "src/objects/js-array-buffer.cc", 4355 "src/objects/js-break-iterator.cc", 4356 "src/objects/js-collator.cc", 4357 "src/objects/js-date-time-format.cc", 4358 "src/objects/js-display-names.cc", 4359 "src/objects/js-function.cc", 4360 "src/objects/js-list-format.cc", 4361 "src/objects/js-locale.cc", 4362 "src/objects/js-number-format.cc", 4363 "src/objects/js-objects.cc", 4364 "src/objects/js-plural-rules.cc", 4365 "src/objects/js-regexp.cc", 4366 "src/objects/js-relative-time-format.cc", 4367 "src/objects/js-segment-iterator.cc", 4368 "src/objects/js-segmenter.cc", 4369 "src/objects/js-segments.cc", 4370 "src/objects/js-temporal-objects.cc", 4371 "src/objects/keys.cc", 4372 "src/objects/literal-objects.cc", 4373 "src/objects/lookup-cache.cc", 4374 "src/objects/lookup.cc", 4375 "src/objects/managed.cc", 4376 "src/objects/map-updater.cc", 4377 "src/objects/map.cc", 4378 "src/objects/module.cc", 4379 "src/objects/object-type.cc", 4380 "src/objects/objects.cc", 4381 "src/objects/option-utils.cc", 4382 "src/objects/ordered-hash-table.cc", 4383 "src/objects/osr-optimized-code-cache.cc", 4384 "src/objects/property-descriptor.cc", 4385 "src/objects/property.cc", 4386 "src/objects/scope-info.cc", 4387 "src/objects/shared-function-info.cc", 4388 "src/objects/source-text-module.cc", 4389 "src/objects/string-comparator.cc", 4390 "src/objects/string-table.cc", 4391 "src/objects/string.cc", 4392 "src/objects/swiss-name-dictionary.cc", 4393 "src/objects/symbol-table.cc", 4394 "src/objects/synthetic-module.cc", 4395 "src/objects/tagged-impl.cc", 4396 "src/objects/template-objects.cc", 4397 "src/objects/templates.cc", 4398 "src/objects/transitions.cc", 4399 "src/objects/type-hints.cc", 4400 "src/objects/value-serializer.cc", 4401 "src/objects/visitors.cc", 4402 "src/parsing/func-name-inferrer.cc", 4403 "src/parsing/import-assertions.cc", 4404 "src/parsing/literal-buffer.cc", 4405 "src/parsing/parse-info.cc", 4406 "src/parsing/parser.cc", 4407 "src/parsing/parsing.cc", 4408 "src/parsing/pending-compilation-error-handler.cc", 4409 "src/parsing/preparse-data.cc", 4410 "src/parsing/preparser.cc", 4411 "src/parsing/rewriter.cc", 4412 "src/parsing/scanner-character-streams.cc", 4413 "src/parsing/scanner.cc", 4414 "src/parsing/token.cc", 4415 "src/profiler/allocation-tracker.cc", 4416 "src/profiler/cpu-profiler.cc", 4417 "src/profiler/heap-profiler.cc", 4418 "src/profiler/heap-snapshot-generator.cc", 4419 "src/profiler/profile-generator.cc", 4420 "src/profiler/profiler-listener.cc", 4421 "src/profiler/profiler-stats.cc", 4422 "src/profiler/sampling-heap-profiler.cc", 4423 "src/profiler/strings-storage.cc", 4424 "src/profiler/symbolizer.cc", 4425 "src/profiler/tick-sample.cc", 4426 "src/profiler/tracing-cpu-profiler.cc", 4427 "src/profiler/weak-code-registry.cc", 4428 "src/regexp/experimental/experimental-bytecode.cc", 4429 "src/regexp/experimental/experimental-compiler.cc", 4430 "src/regexp/experimental/experimental-interpreter.cc", 4431 "src/regexp/experimental/experimental.cc", 4432 "src/regexp/property-sequences.cc", 4433 "src/regexp/regexp-ast.cc", 4434 "src/regexp/regexp-bytecode-generator.cc", 4435 "src/regexp/regexp-bytecode-peephole.cc", 4436 "src/regexp/regexp-bytecodes.cc", 4437 "src/regexp/regexp-compiler-tonode.cc", 4438 "src/regexp/regexp-compiler.cc", 4439 "src/regexp/regexp-dotprinter.cc", 4440 "src/regexp/regexp-error.cc", 4441 "src/regexp/regexp-interpreter.cc", 4442 "src/regexp/regexp-macro-assembler-tracer.cc", 4443 "src/regexp/regexp-macro-assembler.cc", 4444 "src/regexp/regexp-parser.cc", 4445 "src/regexp/regexp-stack.cc", 4446 "src/regexp/regexp-utils.cc", 4447 "src/regexp/regexp.cc", 4448 "src/roots/roots.cc", 4449 "src/runtime/runtime-array.cc", 4450 "src/runtime/runtime-atomics.cc", 4451 "src/runtime/runtime-bigint.cc", 4452 "src/runtime/runtime-classes.cc", 4453 "src/runtime/runtime-collections.cc", 4454 "src/runtime/runtime-compiler.cc", 4455 "src/runtime/runtime-date.cc", 4456 "src/runtime/runtime-debug.cc", 4457 "src/runtime/runtime-forin.cc", 4458 "src/runtime/runtime-function.cc", 4459 "src/runtime/runtime-futex.cc", 4460 "src/runtime/runtime-generator.cc", 4461 "src/runtime/runtime-internal.cc", 4462 "src/runtime/runtime-intl.cc", 4463 "src/runtime/runtime-literals.cc", 4464 "src/runtime/runtime-module.cc", 4465 "src/runtime/runtime-numbers.cc", 4466 "src/runtime/runtime-object.cc", 4467 "src/runtime/runtime-operators.cc", 4468 "src/runtime/runtime-promise.cc", 4469 "src/runtime/runtime-proxy.cc", 4470 "src/runtime/runtime-regexp.cc", 4471 "src/runtime/runtime-scopes.cc", 4472 "src/runtime/runtime-shadow-realm.cc", 4473 "src/runtime/runtime-strings.cc", 4474 "src/runtime/runtime-symbol.cc", 4475 "src/runtime/runtime-test.cc", 4476 "src/runtime/runtime-trace.cc", 4477 "src/runtime/runtime-typedarray.cc", 4478 "src/runtime/runtime-weak-refs.cc", 4479 "src/runtime/runtime.cc", 4480 "src/sandbox/external-pointer-table.cc", 4481 "src/sandbox/sandbox.cc", 4482 "src/snapshot/code-serializer.cc", 4483 "src/snapshot/context-deserializer.cc", 4484 "src/snapshot/context-serializer.cc", 4485 "src/snapshot/deserializer.cc", 4486 "src/snapshot/embedded/embedded-data.cc", 4487 "src/snapshot/object-deserializer.cc", 4488 "src/snapshot/read-only-deserializer.cc", 4489 "src/snapshot/read-only-serializer.cc", 4490 "src/snapshot/roots-serializer.cc", 4491 "src/snapshot/serializer-deserializer.cc", 4492 "src/snapshot/serializer.cc", 4493 "src/snapshot/shared-heap-deserializer.cc", 4494 "src/snapshot/shared-heap-serializer.cc", 4495 "src/snapshot/snapshot-compression.cc", 4496 "src/snapshot/snapshot-data.cc", 4497 "src/snapshot/snapshot-source-sink.cc", 4498 "src/snapshot/snapshot-utils.cc", 4499 "src/snapshot/snapshot.cc", 4500 "src/snapshot/startup-deserializer.cc", 4501 "src/snapshot/startup-serializer.cc", 4502 "src/strings/char-predicates.cc", 4503 "src/strings/string-builder.cc", 4504 "src/strings/string-case.cc", 4505 "src/strings/string-stream.cc", 4506 "src/strings/unicode-decoder.cc", 4507 "src/strings/unicode.cc", 4508 "src/strings/uri.cc", 4509 "src/tasks/cancelable-task.cc", 4510 "src/tasks/operations-barrier.cc", 4511 "src/tasks/task-utils.cc", 4512 "src/temporal/temporal-parser.cc", 4513 "src/third_party/siphash/halfsiphash.cc", 4514 "src/tracing/trace-event.cc", 4515 "src/tracing/traced-value.cc", 4516 "src/tracing/tracing-category-observer.cc", 4517 "src/utils/address-map.cc", 4518 "src/utils/allocation.cc", 4519 "src/utils/bit-vector.cc", 4520 "src/utils/detachable-vector.cc", 4521 "src/utils/identity-map.cc", 4522 "src/utils/memcopy.cc", 4523 "src/utils/ostreams.cc", 4524 "src/utils/utils.cc", 4525 "src/utils/version.cc", 4526 "src/web-snapshot/web-snapshot.cc", 4527 "src/web-snapshot/web-snapshot.h", 4528 "src/zone/accounting-allocator.cc", 4529 "src/zone/type-stats.cc", 4530 "src/zone/zone-segment.cc", 4531 "src/zone/zone.cc", 4532 ] 4533 4534 if (v8_enable_maglev) { 4535 sources += [ 4536 "src/maglev/maglev-code-generator.cc", 4537 "src/maglev/maglev-compilation-info.cc", 4538 "src/maglev/maglev-compilation-unit.cc", 4539 "src/maglev/maglev-compiler.cc", 4540 "src/maglev/maglev-concurrent-dispatcher.cc", 4541 "src/maglev/maglev-graph-builder.cc", 4542 "src/maglev/maglev-graph-printer.cc", 4543 "src/maglev/maglev-ir.cc", 4544 "src/maglev/maglev-regalloc.cc", 4545 "src/maglev/maglev.cc", 4546 ] 4547 } 4548 4549 if (v8_enable_webassembly) { 4550 sources += [ ### gcmole(all) ### 4551 "src/asmjs/asm-js.cc", 4552 "src/asmjs/asm-parser.cc", 4553 "src/asmjs/asm-scanner.cc", 4554 "src/asmjs/asm-types.cc", 4555 "src/debug/debug-wasm-objects.cc", 4556 "src/runtime/runtime-test-wasm.cc", 4557 "src/runtime/runtime-wasm.cc", 4558 "src/trap-handler/handler-inside.cc", 4559 "src/trap-handler/handler-outside.cc", 4560 "src/trap-handler/handler-shared.cc", 4561 "src/wasm/baseline/liftoff-assembler.cc", 4562 "src/wasm/baseline/liftoff-compiler.cc", 4563 "src/wasm/canonical-types.cc", 4564 "src/wasm/code-space-access.cc", 4565 "src/wasm/function-body-decoder.cc", 4566 "src/wasm/function-compiler.cc", 4567 "src/wasm/graph-builder-interface.cc", 4568 "src/wasm/init-expr-interface.cc", 4569 "src/wasm/jump-table-assembler.cc", 4570 "src/wasm/local-decl-encoder.cc", 4571 "src/wasm/memory-protection-key.cc", 4572 "src/wasm/memory-tracing.cc", 4573 "src/wasm/module-compiler.cc", 4574 "src/wasm/module-decoder.cc", 4575 "src/wasm/module-instantiate.cc", 4576 "src/wasm/signature-map.cc", 4577 "src/wasm/simd-shuffle.cc", 4578 "src/wasm/streaming-decoder.cc", 4579 "src/wasm/sync-streaming-decoder.cc", 4580 "src/wasm/value-type.cc", 4581 "src/wasm/wasm-code-manager.cc", 4582 "src/wasm/wasm-debug.cc", 4583 "src/wasm/wasm-debug.h", 4584 "src/wasm/wasm-engine.cc", 4585 "src/wasm/wasm-external-refs.cc", 4586 "src/wasm/wasm-features.cc", 4587 "src/wasm/wasm-import-wrapper-cache.cc", 4588 "src/wasm/wasm-init-expr.cc", 4589 "src/wasm/wasm-js.cc", 4590 "src/wasm/wasm-module-builder.cc", 4591 "src/wasm/wasm-module-sourcemap.cc", 4592 "src/wasm/wasm-module.cc", 4593 "src/wasm/wasm-objects.cc", 4594 "src/wasm/wasm-opcodes.cc", 4595 "src/wasm/wasm-result.cc", 4596 "src/wasm/wasm-serialization.cc", 4597 "src/wasm/wasm-subtyping.cc", 4598 ] 4599 } 4600 4601 if (v8_enable_third_party_heap) { 4602 sources += filter_exclude(v8_third_party_heap_files, [ "*.h" ]) 4603 } else { 4604 sources += [ "src/heap/third-party/heap-api-stub.cc" ] 4605 } 4606 4607 if (v8_enable_conservative_stack_scanning) { 4608 sources += [ "src/heap/conservative-stack-visitor.cc" ] 4609 } 4610 4611 if (v8_enable_wasm_gdb_remote_debugging) { 4612 sources += [ 4613 "src/debug/wasm/gdb-server/gdb-remote-util.cc", 4614 "src/debug/wasm/gdb-server/gdb-server-thread.cc", 4615 "src/debug/wasm/gdb-server/gdb-server.cc", 4616 "src/debug/wasm/gdb-server/packet.cc", 4617 "src/debug/wasm/gdb-server/session.cc", 4618 "src/debug/wasm/gdb-server/target.cc", 4619 "src/debug/wasm/gdb-server/transport.cc", 4620 "src/debug/wasm/gdb-server/wasm-module-debug.cc", 4621 ] 4622 } 4623 4624 if (v8_enable_heap_snapshot_verify) { 4625 sources += [ "src/heap/reference-summarizer.cc" ] 4626 } 4627 4628 if (v8_current_cpu == "x86") { 4629 sources += [ ### gcmole(arch:ia32) ### 4630 "src/codegen/ia32/assembler-ia32.cc", 4631 "src/codegen/ia32/cpu-ia32.cc", 4632 "src/codegen/ia32/macro-assembler-ia32.cc", 4633 "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", 4634 "src/compiler/backend/ia32/code-generator-ia32.cc", 4635 "src/compiler/backend/ia32/instruction-scheduler-ia32.cc", 4636 "src/compiler/backend/ia32/instruction-selector-ia32.cc", 4637 "src/deoptimizer/ia32/deoptimizer-ia32.cc", 4638 "src/diagnostics/ia32/disasm-ia32.cc", 4639 "src/diagnostics/ia32/unwinder-ia32.cc", 4640 "src/execution/ia32/frame-constants-ia32.cc", 4641 "src/regexp/ia32/regexp-macro-assembler-ia32.cc", 4642 ] 4643 } else if (v8_current_cpu == "x64") { 4644 sources += [ ### gcmole(arch:x64) ### 4645 "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", 4646 "src/codegen/x64/assembler-x64.cc", 4647 "src/codegen/x64/cpu-x64.cc", 4648 "src/codegen/x64/macro-assembler-x64.cc", 4649 "src/compiler/backend/x64/code-generator-x64.cc", 4650 "src/compiler/backend/x64/instruction-scheduler-x64.cc", 4651 "src/compiler/backend/x64/instruction-selector-x64.cc", 4652 "src/compiler/backend/x64/unwinding-info-writer-x64.cc", 4653 "src/deoptimizer/x64/deoptimizer-x64.cc", 4654 "src/diagnostics/x64/disasm-x64.cc", 4655 "src/diagnostics/x64/eh-frame-x64.cc", 4656 "src/diagnostics/x64/unwinder-x64.cc", 4657 "src/execution/x64/frame-constants-x64.cc", 4658 "src/regexp/x64/regexp-macro-assembler-x64.cc", 4659 ] 4660 4661 if (is_win) { 4662 sources += [ "src/diagnostics/unwinding-info-win64.cc" ] 4663 } 4664 4665 if (v8_enable_webassembly) { 4666 # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both 4667 # based on Darwin and thus POSIX-compliant to a similar degree. 4668 if (is_linux || is_chromeos || is_mac || is_ios || 4669 target_os == "freebsd") { 4670 sources += [ 4671 "src/trap-handler/handler-inside-posix.cc", 4672 "src/trap-handler/handler-outside-posix.cc", 4673 ] 4674 } else if (is_win) { 4675 sources += [ 4676 "src/trap-handler/handler-inside-win.cc", 4677 "src/trap-handler/handler-outside-win.cc", 4678 ] 4679 } 4680 } 4681 } else if (v8_current_cpu == "arm") { 4682 sources += [ ### gcmole(arch:arm) ### 4683 "src/codegen/arm/assembler-arm.cc", 4684 "src/codegen/arm/constants-arm.cc", 4685 "src/codegen/arm/cpu-arm.cc", 4686 "src/codegen/arm/macro-assembler-arm.cc", 4687 "src/compiler/backend/arm/code-generator-arm.cc", 4688 "src/compiler/backend/arm/instruction-scheduler-arm.cc", 4689 "src/compiler/backend/arm/instruction-selector-arm.cc", 4690 "src/compiler/backend/arm/unwinding-info-writer-arm.cc", 4691 "src/deoptimizer/arm/deoptimizer-arm.cc", 4692 "src/diagnostics/arm/disasm-arm.cc", 4693 "src/diagnostics/arm/eh-frame-arm.cc", 4694 "src/diagnostics/arm/unwinder-arm.cc", 4695 "src/execution/arm/frame-constants-arm.cc", 4696 "src/execution/arm/simulator-arm.cc", 4697 "src/regexp/arm/regexp-macro-assembler-arm.cc", 4698 ] 4699 } else if (v8_current_cpu == "arm64") { 4700 sources += [ ### gcmole(arch:arm64) ### 4701 "src/codegen/arm64/assembler-arm64.cc", 4702 "src/codegen/arm64/cpu-arm64.cc", 4703 "src/codegen/arm64/decoder-arm64.cc", 4704 "src/codegen/arm64/instructions-arm64-constants.cc", 4705 "src/codegen/arm64/instructions-arm64.cc", 4706 "src/codegen/arm64/macro-assembler-arm64.cc", 4707 "src/codegen/arm64/register-arm64.cc", 4708 "src/codegen/arm64/utils-arm64.cc", 4709 "src/compiler/backend/arm64/code-generator-arm64.cc", 4710 "src/compiler/backend/arm64/instruction-scheduler-arm64.cc", 4711 "src/compiler/backend/arm64/instruction-selector-arm64.cc", 4712 "src/compiler/backend/arm64/unwinding-info-writer-arm64.cc", 4713 "src/deoptimizer/arm64/deoptimizer-arm64.cc", 4714 "src/diagnostics/arm64/disasm-arm64.cc", 4715 "src/diagnostics/arm64/eh-frame-arm64.cc", 4716 "src/diagnostics/arm64/unwinder-arm64.cc", 4717 "src/execution/arm64/frame-constants-arm64.cc", 4718 "src/execution/arm64/pointer-auth-arm64.cc", 4719 "src/execution/arm64/simulator-arm64.cc", 4720 "src/execution/arm64/simulator-logic-arm64.cc", 4721 "src/regexp/arm64/regexp-macro-assembler-arm64.cc", 4722 ] 4723 if (v8_enable_webassembly) { 4724 # Trap handling is enabled on arm64 Mac and in simulators on x64 on Linux, 4725 # Mac, and Windows. 4726 if ((current_cpu == "arm64" && is_mac) || 4727 (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { 4728 sources += [ 4729 "src/trap-handler/handler-inside-posix.cc", 4730 "src/trap-handler/handler-outside-posix.cc", 4731 ] 4732 } else if (current_cpu == "x64" && is_win) { 4733 sources += [ 4734 "src/trap-handler/handler-inside-win.cc", 4735 "src/trap-handler/handler-outside-win.cc", 4736 ] 4737 } 4738 if (current_cpu == "x64" && 4739 (is_linux || is_chromeos || is_mac || is_win)) { 4740 sources += [ "src/trap-handler/handler-outside-simulator.cc" ] 4741 } 4742 } 4743 if (is_win) { 4744 sources += [ "src/diagnostics/unwinding-info-win64.cc" ] 4745 } 4746 } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { 4747 sources += [ ### gcmole(arch:mipsel) ### 4748 "src/codegen/mips/assembler-mips.cc", 4749 "src/codegen/mips/constants-mips.cc", 4750 "src/codegen/mips/cpu-mips.cc", 4751 "src/codegen/mips/interface-descriptors-mips-inl.h", 4752 "src/codegen/mips/macro-assembler-mips.cc", 4753 "src/compiler/backend/mips/code-generator-mips.cc", 4754 "src/compiler/backend/mips/instruction-scheduler-mips.cc", 4755 "src/compiler/backend/mips/instruction-selector-mips.cc", 4756 "src/deoptimizer/mips/deoptimizer-mips.cc", 4757 "src/diagnostics/mips/disasm-mips.cc", 4758 "src/diagnostics/mips/unwinder-mips.cc", 4759 "src/execution/mips/frame-constants-mips.cc", 4760 "src/execution/mips/simulator-mips.cc", 4761 "src/regexp/mips/regexp-macro-assembler-mips.cc", 4762 ] 4763 } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { 4764 sources += [ ### gcmole(arch:mips64el) ### 4765 "src/codegen/mips64/assembler-mips64.cc", 4766 "src/codegen/mips64/constants-mips64.cc", 4767 "src/codegen/mips64/cpu-mips64.cc", 4768 "src/codegen/mips64/interface-descriptors-mips64-inl.h", 4769 "src/codegen/mips64/macro-assembler-mips64.cc", 4770 "src/compiler/backend/mips64/code-generator-mips64.cc", 4771 "src/compiler/backend/mips64/instruction-scheduler-mips64.cc", 4772 "src/compiler/backend/mips64/instruction-selector-mips64.cc", 4773 "src/deoptimizer/mips64/deoptimizer-mips64.cc", 4774 "src/diagnostics/mips64/disasm-mips64.cc", 4775 "src/diagnostics/mips64/unwinder-mips64.cc", 4776 "src/execution/mips64/frame-constants-mips64.cc", 4777 "src/execution/mips64/simulator-mips64.cc", 4778 "src/regexp/mips64/regexp-macro-assembler-mips64.cc", 4779 ] 4780 } else if (v8_current_cpu == "loong64") { 4781 sources += [ ### gcmole(arch:loong64) ### 4782 "src/codegen/loong64/assembler-loong64.cc", 4783 "src/codegen/loong64/constants-loong64.cc", 4784 "src/codegen/loong64/cpu-loong64.cc", 4785 "src/codegen/loong64/interface-descriptors-loong64-inl.h", 4786 "src/codegen/loong64/macro-assembler-loong64.cc", 4787 "src/compiler/backend/loong64/code-generator-loong64.cc", 4788 "src/compiler/backend/loong64/instruction-scheduler-loong64.cc", 4789 "src/compiler/backend/loong64/instruction-selector-loong64.cc", 4790 "src/deoptimizer/loong64/deoptimizer-loong64.cc", 4791 "src/diagnostics/loong64/disasm-loong64.cc", 4792 "src/diagnostics/loong64/unwinder-loong64.cc", 4793 "src/execution/loong64/frame-constants-loong64.cc", 4794 "src/execution/loong64/simulator-loong64.cc", 4795 "src/regexp/loong64/regexp-macro-assembler-loong64.cc", 4796 ] 4797 } else if (v8_current_cpu == "ppc") { 4798 sources += [ ### gcmole(arch:ppc) ### 4799 "src/codegen/ppc/assembler-ppc.cc", 4800 "src/codegen/ppc/constants-ppc.cc", 4801 "src/codegen/ppc/cpu-ppc.cc", 4802 "src/codegen/ppc/macro-assembler-ppc.cc", 4803 "src/compiler/backend/ppc/code-generator-ppc.cc", 4804 "src/compiler/backend/ppc/instruction-scheduler-ppc.cc", 4805 "src/compiler/backend/ppc/instruction-selector-ppc.cc", 4806 "src/compiler/backend/ppc/unwinding-info-writer-ppc.cc", 4807 "src/deoptimizer/ppc/deoptimizer-ppc.cc", 4808 "src/diagnostics/ppc/disasm-ppc.cc", 4809 "src/diagnostics/ppc/eh-frame-ppc.cc", 4810 "src/diagnostics/ppc/unwinder-ppc.cc", 4811 "src/execution/ppc/frame-constants-ppc.cc", 4812 "src/execution/ppc/simulator-ppc.cc", 4813 "src/regexp/ppc/regexp-macro-assembler-ppc.cc", 4814 ] 4815 } else if (v8_current_cpu == "ppc64") { 4816 sources += [ ### gcmole(arch:ppc64) ### 4817 "src/codegen/ppc/assembler-ppc.cc", 4818 "src/codegen/ppc/constants-ppc.cc", 4819 "src/codegen/ppc/cpu-ppc.cc", 4820 "src/codegen/ppc/macro-assembler-ppc.cc", 4821 "src/compiler/backend/ppc/code-generator-ppc.cc", 4822 "src/compiler/backend/ppc/instruction-scheduler-ppc.cc", 4823 "src/compiler/backend/ppc/instruction-selector-ppc.cc", 4824 "src/compiler/backend/ppc/unwinding-info-writer-ppc.cc", 4825 "src/deoptimizer/ppc/deoptimizer-ppc.cc", 4826 "src/diagnostics/ppc/disasm-ppc.cc", 4827 "src/diagnostics/ppc/eh-frame-ppc.cc", 4828 "src/diagnostics/ppc/unwinder-ppc.cc", 4829 "src/execution/ppc/frame-constants-ppc.cc", 4830 "src/execution/ppc/simulator-ppc.cc", 4831 "src/regexp/ppc/regexp-macro-assembler-ppc.cc", 4832 ] 4833 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 4834 sources += [ ### gcmole(arch:s390) ### 4835 "src/codegen/s390/assembler-s390.cc", 4836 "src/codegen/s390/constants-s390.cc", 4837 "src/codegen/s390/cpu-s390.cc", 4838 "src/codegen/s390/macro-assembler-s390.cc", 4839 "src/compiler/backend/s390/code-generator-s390.cc", 4840 "src/compiler/backend/s390/instruction-scheduler-s390.cc", 4841 "src/compiler/backend/s390/instruction-selector-s390.cc", 4842 "src/compiler/backend/s390/unwinding-info-writer-s390.cc", 4843 "src/deoptimizer/s390/deoptimizer-s390.cc", 4844 "src/diagnostics/s390/disasm-s390.cc", 4845 "src/diagnostics/s390/eh-frame-s390.cc", 4846 "src/diagnostics/s390/unwinder-s390.cc", 4847 "src/execution/s390/frame-constants-s390.cc", 4848 "src/execution/s390/simulator-s390.cc", 4849 "src/regexp/s390/regexp-macro-assembler-s390.cc", 4850 ] 4851 } else if (v8_current_cpu == "riscv64") { 4852 sources += [ ### gcmole(arch:riscv64) ### 4853 "src/baseline/riscv64/baseline-assembler-riscv64-inl.h", 4854 "src/baseline/riscv64/baseline-compiler-riscv64-inl.h", 4855 "src/codegen/riscv64/assembler-riscv64-inl.h", 4856 "src/codegen/riscv64/assembler-riscv64.cc", 4857 "src/codegen/riscv64/constants-riscv64.cc", 4858 "src/codegen/riscv64/cpu-riscv64.cc", 4859 "src/codegen/riscv64/interface-descriptors-riscv64-inl.h", 4860 "src/codegen/riscv64/macro-assembler-riscv64.cc", 4861 "src/compiler/backend/riscv64/code-generator-riscv64.cc", 4862 "src/compiler/backend/riscv64/instruction-scheduler-riscv64.cc", 4863 "src/compiler/backend/riscv64/instruction-selector-riscv64.cc", 4864 "src/deoptimizer/riscv64/deoptimizer-riscv64.cc", 4865 "src/diagnostics/riscv64/disasm-riscv64.cc", 4866 "src/diagnostics/riscv64/unwinder-riscv64.cc", 4867 "src/execution/riscv64/frame-constants-riscv64.cc", 4868 "src/execution/riscv64/simulator-riscv64.cc", 4869 "src/regexp/riscv64/regexp-macro-assembler-riscv64.cc", 4870 ] 4871 } 4872 4873 # Architecture independent but platform-specific sources 4874 if (is_win) { 4875 if (v8_enable_system_instrumentation) { 4876 sources += [ 4877 "src/diagnostics/system-jit-metadata-win.h", 4878 "src/diagnostics/system-jit-win.cc", 4879 "src/diagnostics/system-jit-win.h", 4880 ] 4881 } 4882 } 4883 4884 configs = [ 4885 ":internal_config", 4886 ":cppgc_base_config", 4887 ] 4888 4889 deps = [ 4890 ":torque_generated_definitions", 4891 ":v8_bigint", 4892 ":v8_headers", 4893 ":v8_heap_base", 4894 ":v8_libbase", 4895 ":v8_shared_internal_headers", 4896 ":v8_tracing", 4897 ":v8_version", 4898 "src/inspector:inspector", 4899 ] 4900 4901 public_deps = [ 4902 ":cppgc_base", 4903 ":generate_bytecode_builtins_list", 4904 ":run_torque", 4905 ":v8_headers", 4906 ":v8_internal_headers", 4907 ":v8_maybe_icu", 4908 ] 4909 4910 if (v8_enable_i18n_support) { 4911 deps += [ ":run_gen-regexp-special-case" ] 4912 sources += [ "$target_gen_dir/src/regexp/special-case.cc" ] 4913 if (is_win) { 4914 deps += [ "//third_party/icu:icudata" ] 4915 } 4916 } else { 4917 sources -= [ 4918 "src/builtins/builtins-intl.cc", 4919 "src/objects/intl-objects.cc", 4920 "src/objects/js-break-iterator.cc", 4921 "src/objects/js-collator.cc", 4922 "src/objects/js-date-time-format.cc", 4923 "src/objects/js-display-names.cc", 4924 "src/objects/js-list-format.cc", 4925 "src/objects/js-locale.cc", 4926 "src/objects/js-number-format.cc", 4927 "src/objects/js-plural-rules.cc", 4928 "src/objects/js-relative-time-format.cc", 4929 "src/objects/js-segment-iterator.cc", 4930 "src/objects/js-segmenter.cc", 4931 "src/objects/js-segments.cc", 4932 "src/runtime/runtime-intl.cc", 4933 "src/strings/char-predicates.cc", 4934 ] 4935 } 4936 4937 deps += [ 4938 "//third_party/zlib", 4939 "//third_party/zlib/google:compression_utils_portable", 4940 ] 4941 4942 if (v8_postmortem_support) { 4943 sources += [ "$target_gen_dir/debug-support.cc" ] 4944 deps += [ ":postmortem-metadata" ] 4945 } 4946 4947 libs = [] 4948 4949 if (v8_enable_third_party_heap) { 4950 libs += v8_third_party_heap_libs 4951 } 4952 4953 # Platforms that don't have CAS support need to link atomic library 4954 # to implement atomic memory access 4955 if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || 4956 v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || 4957 v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || 4958 v8_current_cpu == "s390" || v8_current_cpu == "s390x" || 4959 v8_current_cpu == "riscv64") { 4960 libs += [ "atomic" ] 4961 } 4962 4963 if (v8_enable_vtunetracemark && (is_linux || is_chromeos || is_win)) { 4964 sources += [ 4965 "src/extensions/vtunedomain-support-extension.cc", 4966 "src/extensions/vtunedomain-support-extension.h", 4967 ] 4968 deps += [ "src/third_party/vtune:v8_vtune_trace_mark" ] 4969 } 4970 4971 if (v8_use_perfetto) { 4972 sources += [ 4973 "src/tracing/trace-categories.cc", 4974 "src/tracing/trace-categories.h", 4975 ] 4976 } 4977} 4978 4979group("v8_base") { 4980 public_deps = [ 4981 ":v8_base_without_compiler", 4982 ":v8_compiler", 4983 ] 4984} 4985 4986v8_source_set("torque_base") { 4987 visibility = [ ":*" ] # Only targets in this file can depend on this. 4988 4989 sources = [ 4990 "src/numbers/integer-literal-inl.h", 4991 "src/numbers/integer-literal.h", 4992 "src/torque/ast.h", 4993 "src/torque/cc-generator.cc", 4994 "src/torque/cc-generator.h", 4995 "src/torque/cfg.cc", 4996 "src/torque/cfg.h", 4997 "src/torque/class-debug-reader-generator.cc", 4998 "src/torque/constants.h", 4999 "src/torque/contextual.h", 5000 "src/torque/cpp-builder.cc", 5001 "src/torque/cpp-builder.h", 5002 "src/torque/csa-generator.cc", 5003 "src/torque/csa-generator.h", 5004 "src/torque/declarable.cc", 5005 "src/torque/declarable.h", 5006 "src/torque/declaration-visitor.cc", 5007 "src/torque/declaration-visitor.h", 5008 "src/torque/declarations.cc", 5009 "src/torque/declarations.h", 5010 "src/torque/earley-parser.cc", 5011 "src/torque/earley-parser.h", 5012 "src/torque/global-context.cc", 5013 "src/torque/global-context.h", 5014 "src/torque/implementation-visitor.cc", 5015 "src/torque/implementation-visitor.h", 5016 "src/torque/instance-type-generator.cc", 5017 "src/torque/instructions.cc", 5018 "src/torque/instructions.h", 5019 "src/torque/kythe-data.cc", 5020 "src/torque/kythe-data.h", 5021 "src/torque/parameter-difference.h", 5022 "src/torque/server-data.cc", 5023 "src/torque/server-data.h", 5024 "src/torque/source-positions.cc", 5025 "src/torque/source-positions.h", 5026 "src/torque/torque-code-generator.cc", 5027 "src/torque/torque-code-generator.h", 5028 "src/torque/torque-compiler.cc", 5029 "src/torque/torque-compiler.h", 5030 "src/torque/torque-parser.cc", 5031 "src/torque/torque-parser.h", 5032 "src/torque/type-inference.cc", 5033 "src/torque/type-inference.h", 5034 "src/torque/type-oracle.cc", 5035 "src/torque/type-oracle.h", 5036 "src/torque/type-visitor.cc", 5037 "src/torque/type-visitor.h", 5038 "src/torque/types.cc", 5039 "src/torque/types.h", 5040 "src/torque/utils.cc", 5041 "src/torque/utils.h", 5042 ] 5043 5044 deps = [ 5045 ":v8_flags", 5046 ":v8_shared_internal_headers", 5047 ] 5048 5049 public_deps = [ ":v8_libbase" ] 5050 5051 # The use of exceptions for Torque in violation of the Chromium style-guide 5052 # is justified by the fact that it is only used from the non-essential 5053 # language server and can be removed anytime if it causes problems. 5054 configs = [ 5055 ":internal_config", 5056 "//build/config/compiler:exceptions", 5057 "//build/config/compiler:rtti", 5058 ] 5059 5060 remove_configs = [ 5061 "//build/config/compiler:no_exceptions", 5062 "//build/config/compiler:no_rtti", 5063 ] 5064 5065 if (is_win && is_asan) { 5066 # Due to a bug in ASAN on Windows (chromium:893437), we disable ASAN for 5067 # Torque on Windows. 5068 remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] 5069 } 5070 5071 if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) { 5072 # The :no_optimize config is added to v8_add_configs in v8.gni. 5073 remove_configs += [ "//build/config/compiler:no_optimize" ] 5074 configs += [ ":always_optimize" ] 5075 } 5076} 5077 5078v8_source_set("torque_ls_base") { 5079 sources = [ 5080 "src/torque/ls/globals.h", 5081 "src/torque/ls/json-parser.cc", 5082 "src/torque/ls/json-parser.h", 5083 "src/torque/ls/json.cc", 5084 "src/torque/ls/json.h", 5085 "src/torque/ls/message-handler.cc", 5086 "src/torque/ls/message-handler.h", 5087 "src/torque/ls/message-macros.h", 5088 "src/torque/ls/message-pipe.h", 5089 "src/torque/ls/message.h", 5090 ] 5091 5092 public_deps = [ ":torque_base" ] 5093 5094 # The use of exceptions for Torque in violation of the Chromium style-guide 5095 # is justified by the fact that it is only used from the non-essential 5096 # language server and can be removed anytime if it causes problems. 5097 configs = [ 5098 ":internal_config", 5099 "//build/config/compiler:exceptions", 5100 "//build/config/compiler:rtti", 5101 ] 5102 5103 remove_configs = [ 5104 "//build/config/compiler:no_exceptions", 5105 "//build/config/compiler:no_rtti", 5106 ] 5107 5108 if (is_win && is_asan) { 5109 remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] 5110 } 5111} 5112 5113v8_component("v8_libbase") { 5114 sources = [ 5115 "src/base/address-region.h", 5116 "src/base/atomic-utils.h", 5117 "src/base/atomicops.h", 5118 "src/base/atomicops_internals_atomicword_compat.h", 5119 "src/base/base-export.h", 5120 "src/base/bit-field.h", 5121 "src/base/bits-iterator.h", 5122 "src/base/bits.cc", 5123 "src/base/bits.h", 5124 "src/base/bounded-page-allocator.cc", 5125 "src/base/bounded-page-allocator.h", 5126 "src/base/bounds.h", 5127 "src/base/build_config.h", 5128 "src/base/compiler-specific.h", 5129 "src/base/cpu.cc", 5130 "src/base/cpu.h", 5131 "src/base/debug/stack_trace.cc", 5132 "src/base/debug/stack_trace.h", 5133 "src/base/division-by-constant.cc", 5134 "src/base/division-by-constant.h", 5135 "src/base/emulated-virtual-address-subspace.cc", 5136 "src/base/emulated-virtual-address-subspace.h", 5137 "src/base/enum-set.h", 5138 "src/base/export-template.h", 5139 "src/base/file-utils.cc", 5140 "src/base/file-utils.h", 5141 "src/base/flags.h", 5142 "src/base/free_deleter.h", 5143 "src/base/functional.cc", 5144 "src/base/functional.h", 5145 "src/base/hashmap-entry.h", 5146 "src/base/hashmap.h", 5147 "src/base/ieee754.cc", 5148 "src/base/ieee754.h", 5149 "src/base/immediate-crash.h", 5150 "src/base/iterator.h", 5151 "src/base/lazy-instance.h", 5152 "src/base/logging.cc", 5153 "src/base/logging.h", 5154 "src/base/macros.h", 5155 "src/base/memory.h", 5156 "src/base/numbers/bignum-dtoa.cc", 5157 "src/base/numbers/bignum-dtoa.h", 5158 "src/base/numbers/bignum.cc", 5159 "src/base/numbers/bignum.h", 5160 "src/base/numbers/cached-powers.cc", 5161 "src/base/numbers/cached-powers.h", 5162 "src/base/numbers/diy-fp.cc", 5163 "src/base/numbers/diy-fp.h", 5164 "src/base/numbers/double.h", 5165 "src/base/numbers/dtoa.cc", 5166 "src/base/numbers/dtoa.h", 5167 "src/base/numbers/fast-dtoa.cc", 5168 "src/base/numbers/fast-dtoa.h", 5169 "src/base/numbers/fixed-dtoa.cc", 5170 "src/base/numbers/fixed-dtoa.h", 5171 "src/base/numbers/strtod.cc", 5172 "src/base/numbers/strtod.h", 5173 "src/base/once.cc", 5174 "src/base/once.h", 5175 "src/base/optional.h", 5176 "src/base/overflowing-math.h", 5177 "src/base/page-allocator.cc", 5178 "src/base/page-allocator.h", 5179 "src/base/platform/condition-variable.cc", 5180 "src/base/platform/condition-variable.h", 5181 "src/base/platform/elapsed-timer.h", 5182 "src/base/platform/mutex.cc", 5183 "src/base/platform/mutex.h", 5184 "src/base/platform/platform.h", 5185 "src/base/platform/semaphore.cc", 5186 "src/base/platform/semaphore.h", 5187 "src/base/platform/time.cc", 5188 "src/base/platform/time.h", 5189 "src/base/platform/wrappers.h", 5190 "src/base/platform/yield-processor.h", 5191 "src/base/pointer-with-payload.h", 5192 "src/base/region-allocator.cc", 5193 "src/base/region-allocator.h", 5194 "src/base/ring-buffer.h", 5195 "src/base/safe_conversions.h", 5196 "src/base/safe_conversions_arm_impl.h", 5197 "src/base/safe_conversions_impl.h", 5198 "src/base/sanitizer/asan.h", 5199 "src/base/sanitizer/lsan-page-allocator.cc", 5200 "src/base/sanitizer/lsan-page-allocator.h", 5201 "src/base/sanitizer/lsan-virtual-address-space.cc", 5202 "src/base/sanitizer/lsan-virtual-address-space.h", 5203 "src/base/sanitizer/lsan.h", 5204 "src/base/sanitizer/msan.h", 5205 "src/base/sanitizer/tsan.h", 5206 "src/base/small-vector.h", 5207 "src/base/strings.cc", 5208 "src/base/strings.h", 5209 "src/base/sys-info.cc", 5210 "src/base/sys-info.h", 5211 "src/base/template-utils.h", 5212 "src/base/threaded-list.h", 5213 "src/base/timezone-cache.h", 5214 "src/base/utils/random-number-generator.cc", 5215 "src/base/utils/random-number-generator.h", 5216 "src/base/v8-fallthrough.h", 5217 "src/base/vector.h", 5218 "src/base/virtual-address-space-page-allocator.cc", 5219 "src/base/virtual-address-space-page-allocator.h", 5220 "src/base/virtual-address-space.cc", 5221 "src/base/virtual-address-space.h", 5222 "src/base/vlq-base64.cc", 5223 "src/base/vlq-base64.h", 5224 "src/base/vlq.h", 5225 ] 5226 5227 configs = [ ":internal_config_base" ] 5228 5229 public_configs = [ ":libbase_config" ] 5230 5231 deps = [ ":v8_config_headers" ] 5232 5233 data = [] 5234 5235 data_deps = [] 5236 5237 defines = [] 5238 5239 if (is_component_build) { 5240 defines = [ "BUILDING_V8_BASE_SHARED" ] 5241 } 5242 5243 if (is_posix || is_fuchsia) { 5244 sources += [ 5245 "src/base/platform/platform-posix.cc", 5246 "src/base/platform/platform-posix.h", 5247 ] 5248 if (current_os != "aix") { 5249 sources += [ 5250 "src/base/platform/platform-posix-time.cc", 5251 "src/base/platform/platform-posix-time.h", 5252 ] 5253 } 5254 } 5255 5256 if (is_linux || is_chromeos) { 5257 sources += [ 5258 "src/base/debug/stack_trace_posix.cc", 5259 "src/base/platform/platform-linux.cc", 5260 ] 5261 5262 libs = [ 5263 "dl", 5264 "rt", 5265 ] 5266 } else if (current_os == "aix") { 5267 sources += [ 5268 "src/base/debug/stack_trace_posix.cc", 5269 "src/base/platform/platform-aix.cc", 5270 ] 5271 5272 libs = [ "dl" ] 5273 } else if (is_android) { 5274 if (current_toolchain == host_toolchain) { 5275 libs = [ 5276 "dl", 5277 "rt", 5278 ] 5279 if (host_os == "mac") { 5280 sources += [ 5281 "src/base/debug/stack_trace_posix.cc", 5282 "src/base/platform/platform-darwin.cc", 5283 "src/base/platform/platform-macos.cc", 5284 ] 5285 } else { 5286 sources += [ 5287 "src/base/debug/stack_trace_posix.cc", 5288 "src/base/platform/platform-linux.cc", 5289 ] 5290 } 5291 } else { 5292 sources += [ 5293 "src/base/debug/stack_trace_android.cc", 5294 "src/base/platform/platform-linux.cc", 5295 ] 5296 } 5297 } else if (is_fuchsia) { 5298 sources += [ 5299 "src/base/debug/stack_trace_fuchsia.cc", 5300 "src/base/platform/platform-fuchsia.cc", 5301 ] 5302 deps += [ 5303 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.kernel", 5304 "//third_party/fuchsia-sdk/sdk/pkg/fdio", 5305 "//third_party/fuchsia-sdk/sdk/pkg/zx", 5306 ] 5307 } else if (is_mac) { 5308 sources += [ 5309 "src/base/debug/stack_trace_posix.cc", 5310 "src/base/platform/platform-darwin.cc", 5311 "src/base/platform/platform-macos.cc", 5312 ] 5313 } else if (is_ios) { 5314 sources += [ 5315 "src/base/debug/stack_trace_posix.cc", 5316 "src/base/platform/platform-darwin.cc", 5317 ] 5318 } else if (is_win) { 5319 # TODO(infra): Add support for cygwin. 5320 sources += [ 5321 "src/base/debug/stack_trace_win.cc", 5322 "src/base/platform/platform-win32.cc", 5323 "src/base/win32-headers.h", 5324 ] 5325 5326 defines += [ "_CRT_RAND_S" ] # for rand_s() 5327 5328 libs = [ 5329 "dbghelp.lib", 5330 "winmm.lib", 5331 "ws2_32.lib", 5332 ] 5333 5334 if (v8_enable_system_instrumentation) { 5335 libs += [ "advapi32.lib" ] # Needed for TraceLoggingProvider.h 5336 } 5337 5338 data_deps += [ "//build/win:runtime_libs" ] 5339 } 5340 5341 if (v8_current_cpu == "mips" || v8_current_cpu == "mips64") { 5342 # Add runtime libs for mips. 5343 data += [ 5344 "tools/mips_toolchain/sysroot/usr/lib/", 5345 "tools/mips_toolchain/mips-mti-linux-gnu/lib", 5346 ] 5347 } 5348 5349 if (is_ubsan && (v8_current_cpu == "x86" || v8_current_cpu == "arm" || 5350 v8_current_cpu == "mips")) { 5351 # Special UBSan 32-bit requirement. 5352 sources += [ "src/base/ubsan.cc" ] 5353 } 5354 5355 if (v8_current_cpu == "riscv64") { 5356 libs += [ "atomic" ] 5357 } 5358 5359 if (is_tsan && !build_with_chromium) { 5360 data += [ "tools/sanitizers/tsan_suppressions.txt" ] 5361 } 5362 5363 if (using_sanitizer && !build_with_chromium) { 5364 data_deps += 5365 [ "//build/config/clang:llvm-symbolizer_data($host_toolchain)" ] 5366 } 5367 5368 # TODO(infra): Add support for qnx, freebsd, openbsd, netbsd, and solaris. 5369} 5370 5371v8_component("v8_libplatform") { 5372 sources = [ 5373 "//base/trace_event/common/trace_event_common.h", 5374 "include/libplatform/libplatform-export.h", 5375 "include/libplatform/libplatform.h", 5376 "include/libplatform/v8-tracing.h", 5377 "src/libplatform/default-foreground-task-runner.cc", 5378 "src/libplatform/default-foreground-task-runner.h", 5379 "src/libplatform/default-job.cc", 5380 "src/libplatform/default-job.h", 5381 "src/libplatform/default-platform.cc", 5382 "src/libplatform/default-platform.h", 5383 "src/libplatform/default-worker-threads-task-runner.cc", 5384 "src/libplatform/default-worker-threads-task-runner.h", 5385 "src/libplatform/delayed-task-queue.cc", 5386 "src/libplatform/delayed-task-queue.h", 5387 "src/libplatform/task-queue.cc", 5388 "src/libplatform/task-queue.h", 5389 "src/libplatform/tracing/trace-buffer.cc", 5390 "src/libplatform/tracing/trace-buffer.h", 5391 "src/libplatform/tracing/trace-config.cc", 5392 "src/libplatform/tracing/trace-object.cc", 5393 "src/libplatform/tracing/trace-writer.cc", 5394 "src/libplatform/tracing/trace-writer.h", 5395 "src/libplatform/tracing/tracing-controller.cc", 5396 "src/libplatform/worker-thread.cc", 5397 "src/libplatform/worker-thread.h", 5398 ] 5399 5400 configs = [ ":internal_config_base" ] 5401 5402 if (is_component_build) { 5403 defines = [ "BUILDING_V8_PLATFORM_SHARED" ] 5404 } 5405 5406 public_configs = [ ":libplatform_config" ] 5407 5408 public_deps = [] 5409 5410 deps = [ 5411 ":v8_config_headers", 5412 ":v8_libbase", 5413 ":v8_tracing", 5414 ] 5415 5416 if (v8_use_perfetto) { 5417 sources -= [ 5418 "//base/trace_event/common/trace_event_common.h", 5419 "src/libplatform/tracing/trace-buffer.cc", 5420 "src/libplatform/tracing/trace-buffer.h", 5421 "src/libplatform/tracing/trace-object.cc", 5422 "src/libplatform/tracing/trace-writer.cc", 5423 "src/libplatform/tracing/trace-writer.h", 5424 ] 5425 sources += [ 5426 "src/libplatform/tracing/trace-event-listener.cc", 5427 "src/libplatform/tracing/trace-event-listener.h", 5428 ] 5429 deps += [ 5430 # TODO(skyostil): Switch TraceEventListener to protozero. 5431 "//third_party/perfetto/protos/perfetto/trace:lite", 5432 ] 5433 } 5434 5435 if (v8_enable_system_instrumentation) { 5436 sources += [ "src/libplatform/tracing/recorder.h" ] 5437 if (is_mac) { 5438 sources += [ "src/libplatform/tracing/recorder-mac.cc" ] 5439 } else if (is_win) { 5440 sources += [ "src/libplatform/tracing/recorder-win.cc" ] 5441 } 5442 } 5443 5444 if (v8_current_cpu == "riscv64") { 5445 libs = [ "atomic" ] 5446 } 5447} 5448 5449v8_source_set("fuzzer_support") { 5450 visibility = [ ":*" ] # Only targets in this file can depend on this. 5451 5452 sources = [ 5453 "test/fuzzer/fuzzer-support.cc", 5454 "test/fuzzer/fuzzer-support.h", 5455 ] 5456 5457 configs = [ ":internal_config_base" ] 5458 5459 public_deps = [ 5460 ":v8", 5461 ":v8_libbase", 5462 ":v8_libplatform", 5463 ":v8_maybe_icu", 5464 ] 5465} 5466 5467v8_source_set("v8_bigint") { 5468 sources = [ 5469 "src/bigint/bigint-internal.cc", 5470 "src/bigint/bigint-internal.h", 5471 "src/bigint/bigint.h", 5472 "src/bigint/bitwise.cc", 5473 "src/bigint/digit-arithmetic.h", 5474 "src/bigint/div-burnikel.cc", 5475 "src/bigint/div-helpers.cc", 5476 "src/bigint/div-helpers.h", 5477 "src/bigint/div-schoolbook.cc", 5478 "src/bigint/fromstring.cc", 5479 "src/bigint/mul-karatsuba.cc", 5480 "src/bigint/mul-schoolbook.cc", 5481 "src/bigint/tostring.cc", 5482 "src/bigint/util.h", 5483 "src/bigint/vector-arithmetic.cc", 5484 "src/bigint/vector-arithmetic.h", 5485 ] 5486 5487 if (v8_advanced_bigint_algorithms) { 5488 sources += [ 5489 "src/bigint/div-barrett.cc", 5490 "src/bigint/mul-fft.cc", 5491 "src/bigint/mul-toom.cc", 5492 ] 5493 } 5494 5495 configs = [ ":internal_config" ] 5496} 5497 5498v8_source_set("v8_heap_base_headers") { 5499 sources = [ 5500 "src/heap/base/active-system-pages.h", 5501 "src/heap/base/stack.h", 5502 "src/heap/base/worklist.h", 5503 ] 5504 5505 configs = [ ":internal_config" ] 5506 5507 public_deps = [ ":v8_libbase" ] 5508} 5509 5510v8_source_set("v8_heap_base") { 5511 sources = [ 5512 "src/heap/base/active-system-pages.cc", 5513 "src/heap/base/stack.cc", 5514 "src/heap/base/worklist.cc", 5515 ] 5516 5517 if (is_clang || !is_win) { 5518 if (current_cpu == "x64") { 5519 sources += [ "src/heap/base/asm/x64/push_registers_asm.cc" ] 5520 } else if (current_cpu == "x86") { 5521 sources += [ "src/heap/base/asm/ia32/push_registers_asm.cc" ] 5522 } else if (current_cpu == "arm") { 5523 sources += [ "src/heap/base/asm/arm/push_registers_asm.cc" ] 5524 } else if (current_cpu == "arm64") { 5525 sources += [ "src/heap/base/asm/arm64/push_registers_asm.cc" ] 5526 } else if (current_cpu == "ppc64") { 5527 sources += [ "src/heap/base/asm/ppc/push_registers_asm.cc" ] 5528 } else if (current_cpu == "s390x") { 5529 sources += [ "src/heap/base/asm/s390/push_registers_asm.cc" ] 5530 } else if (current_cpu == "mipsel") { 5531 sources += [ "src/heap/base/asm/mips/push_registers_asm.cc" ] 5532 } else if (current_cpu == "mips64el") { 5533 sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ] 5534 } else if (current_cpu == "loong64") { 5535 sources += [ "src/heap/base/asm/loong64/push_registers_asm.cc" ] 5536 } else if (current_cpu == "riscv64") { 5537 sources += [ "src/heap/base/asm/riscv64/push_registers_asm.cc" ] 5538 } 5539 } else if (is_win) { 5540 if (current_cpu == "x64") { 5541 sources += [ "src/heap/base/asm/x64/push_registers_masm.S" ] 5542 } else if (current_cpu == "x86") { 5543 sources += [ "src/heap/base/asm/ia32/push_registers_masm.S" ] 5544 } else if (current_cpu == "arm64") { 5545 sources += [ "src/heap/base/asm/arm64/push_registers_masm.S" ] 5546 } 5547 } 5548 5549 configs = [ ":internal_config" ] 5550 5551 public_deps = [ 5552 ":v8_heap_base_headers", 5553 ":v8_libbase", 5554 ] 5555} 5556 5557# This is split out to be a non-code containing target that the Chromium browser 5558# can depend upon to get basic cppgc types. 5559v8_header_set("cppgc_headers") { 5560 configs = [ ":internal_config" ] 5561 public_configs = [ 5562 ":v8_header_features", 5563 ":cppgc_header_features", 5564 ] 5565 5566 sources = [ 5567 "include/cppgc/allocation.h", 5568 "include/cppgc/common.h", 5569 "include/cppgc/cross-thread-persistent.h", 5570 "include/cppgc/custom-space.h", 5571 "include/cppgc/default-platform.h", 5572 "include/cppgc/ephemeron-pair.h", 5573 "include/cppgc/explicit-management.h", 5574 "include/cppgc/garbage-collected.h", 5575 "include/cppgc/heap-consistency.h", 5576 "include/cppgc/heap-state.h", 5577 "include/cppgc/heap-statistics.h", 5578 "include/cppgc/heap.h", 5579 "include/cppgc/internal/api-constants.h", 5580 "include/cppgc/internal/atomic-entry-flag.h", 5581 "include/cppgc/internal/compiler-specific.h", 5582 "include/cppgc/internal/finalizer-trait.h", 5583 "include/cppgc/internal/gc-info.h", 5584 "include/cppgc/internal/name-trait.h", 5585 "include/cppgc/internal/persistent-node.h", 5586 "include/cppgc/internal/pointer-policies.h", 5587 "include/cppgc/internal/write-barrier.h", 5588 "include/cppgc/liveness-broker.h", 5589 "include/cppgc/macros.h", 5590 "include/cppgc/member.h", 5591 "include/cppgc/name-provider.h", 5592 "include/cppgc/object-size-trait.h", 5593 "include/cppgc/persistent.h", 5594 "include/cppgc/platform.h", 5595 "include/cppgc/prefinalizer.h", 5596 "include/cppgc/process-heap-statistics.h", 5597 "include/cppgc/sentinel-pointer.h", 5598 "include/cppgc/source-location.h", 5599 5600 # TODO(v8:11952): Remove the testing header here once depending on both, 5601 # //v8:v8 and //v8:v8_for_testing does not result in ODR violations. 5602 "include/cppgc/testing.h", 5603 "include/cppgc/trace-trait.h", 5604 "include/cppgc/type-traits.h", 5605 "include/cppgc/visitor.h", 5606 ] 5607 5608 if (cppgc_enable_caged_heap) { 5609 sources += [ "include/cppgc/internal/caged-heap-local-data.h" ] 5610 } 5611 5612 deps = [ 5613 ":v8_libbase", 5614 ":v8_libplatform", 5615 ] 5616 5617 public_deps = [ ":v8_config_headers" ] 5618} 5619 5620v8_source_set("cppgc_base") { 5621 visibility = [ ":*" ] 5622 5623 sources = [ 5624 "src/heap/cppgc/allocation.cc", 5625 "src/heap/cppgc/compaction-worklists.cc", 5626 "src/heap/cppgc/compaction-worklists.h", 5627 "src/heap/cppgc/compactor.cc", 5628 "src/heap/cppgc/compactor.h", 5629 "src/heap/cppgc/concurrent-marker.cc", 5630 "src/heap/cppgc/concurrent-marker.h", 5631 "src/heap/cppgc/explicit-management.cc", 5632 "src/heap/cppgc/free-list.cc", 5633 "src/heap/cppgc/free-list.h", 5634 "src/heap/cppgc/garbage-collector.h", 5635 "src/heap/cppgc/gc-info-table.cc", 5636 "src/heap/cppgc/gc-info-table.h", 5637 "src/heap/cppgc/gc-info.cc", 5638 "src/heap/cppgc/gc-invoker.cc", 5639 "src/heap/cppgc/gc-invoker.h", 5640 "src/heap/cppgc/globals.h", 5641 "src/heap/cppgc/heap-base.cc", 5642 "src/heap/cppgc/heap-base.h", 5643 "src/heap/cppgc/heap-consistency.cc", 5644 "src/heap/cppgc/heap-growing.cc", 5645 "src/heap/cppgc/heap-growing.h", 5646 "src/heap/cppgc/heap-object-header.cc", 5647 "src/heap/cppgc/heap-object-header.h", 5648 "src/heap/cppgc/heap-page.cc", 5649 "src/heap/cppgc/heap-page.h", 5650 "src/heap/cppgc/heap-space.cc", 5651 "src/heap/cppgc/heap-space.h", 5652 "src/heap/cppgc/heap-state.cc", 5653 "src/heap/cppgc/heap-statistics-collector.cc", 5654 "src/heap/cppgc/heap-statistics-collector.h", 5655 "src/heap/cppgc/heap-visitor.h", 5656 "src/heap/cppgc/heap.cc", 5657 "src/heap/cppgc/heap.h", 5658 "src/heap/cppgc/incremental-marking-schedule.cc", 5659 "src/heap/cppgc/incremental-marking-schedule.h", 5660 "src/heap/cppgc/liveness-broker.cc", 5661 "src/heap/cppgc/liveness-broker.h", 5662 "src/heap/cppgc/logging.cc", 5663 "src/heap/cppgc/marker.cc", 5664 "src/heap/cppgc/marker.h", 5665 "src/heap/cppgc/marking-state.cc", 5666 "src/heap/cppgc/marking-state.h", 5667 "src/heap/cppgc/marking-verifier.cc", 5668 "src/heap/cppgc/marking-verifier.h", 5669 "src/heap/cppgc/marking-visitor.cc", 5670 "src/heap/cppgc/marking-visitor.h", 5671 "src/heap/cppgc/marking-worklists.cc", 5672 "src/heap/cppgc/marking-worklists.h", 5673 "src/heap/cppgc/memory.cc", 5674 "src/heap/cppgc/memory.h", 5675 "src/heap/cppgc/metric-recorder.h", 5676 "src/heap/cppgc/name-trait.cc", 5677 "src/heap/cppgc/object-allocator.cc", 5678 "src/heap/cppgc/object-allocator.h", 5679 "src/heap/cppgc/object-poisoner.h", 5680 "src/heap/cppgc/object-size-trait.cc", 5681 "src/heap/cppgc/object-start-bitmap.h", 5682 "src/heap/cppgc/object-view.h", 5683 "src/heap/cppgc/page-memory.cc", 5684 "src/heap/cppgc/page-memory.h", 5685 "src/heap/cppgc/persistent-node.cc", 5686 "src/heap/cppgc/platform.cc", 5687 "src/heap/cppgc/platform.h", 5688 "src/heap/cppgc/pointer-policies.cc", 5689 "src/heap/cppgc/prefinalizer-handler.cc", 5690 "src/heap/cppgc/prefinalizer-handler.h", 5691 "src/heap/cppgc/process-heap-statistics.cc", 5692 "src/heap/cppgc/process-heap-statistics.h", 5693 "src/heap/cppgc/process-heap.cc", 5694 "src/heap/cppgc/process-heap.h", 5695 "src/heap/cppgc/raw-heap.cc", 5696 "src/heap/cppgc/raw-heap.h", 5697 "src/heap/cppgc/remembered-set.cc", 5698 "src/heap/cppgc/remembered-set.h", 5699 "src/heap/cppgc/source-location.cc", 5700 "src/heap/cppgc/stats-collector.cc", 5701 "src/heap/cppgc/stats-collector.h", 5702 "src/heap/cppgc/sweeper.cc", 5703 "src/heap/cppgc/sweeper.h", 5704 "src/heap/cppgc/task-handle.h", 5705 "src/heap/cppgc/unmarker.h", 5706 5707 # TODO(v8:11952): Remove the testing header here once depending on both, 5708 # //v8:v8 and //v8:v8_for_testing does not result in ODR violations. 5709 "src/heap/cppgc/testing.cc", 5710 "src/heap/cppgc/trace-event.h", 5711 "src/heap/cppgc/trace-trait.cc", 5712 "src/heap/cppgc/virtual-memory.cc", 5713 "src/heap/cppgc/virtual-memory.h", 5714 "src/heap/cppgc/visitor.cc", 5715 "src/heap/cppgc/visitor.h", 5716 "src/heap/cppgc/write-barrier.cc", 5717 "src/heap/cppgc/write-barrier.h", 5718 ] 5719 5720 if (cppgc_enable_caged_heap) { 5721 sources += [ 5722 "src/heap/cppgc/caged-heap-local-data.cc", 5723 "src/heap/cppgc/caged-heap.cc", 5724 "src/heap/cppgc/caged-heap.h", 5725 ] 5726 } 5727 5728 configs = [ 5729 ":internal_config", 5730 ":cppgc_base_config", 5731 ] 5732 5733 public_deps = [ 5734 ":cppgc_headers", 5735 ":v8_heap_base", 5736 ":v8_libbase", 5737 ":v8_libplatform", 5738 ] 5739 5740 if (cppgc_is_standalone && !v8_use_perfetto) { 5741 sources += [ "//base/trace_event/common/trace_event_common.h" ] 5742 } else { 5743 public_deps += [ ":v8_tracing" ] 5744 } 5745} 5746 5747if (v8_check_header_includes) { 5748 # This file will be generated by tools/generate-header-include-checks.py 5749 # if the "check_v8_header_includes" gclient variable is set. 5750 import("check-header-includes/sources.gni") 5751 v8_source_set("check_headers") { 5752 configs = [ ":internal_config" ] 5753 sources = check_header_includes_sources 5754 5755 # Any rules that contain headers files should be added here either directly 5756 # or indirectly by including something that has it transitively in its 5757 # public_deps. 5758 deps = [ 5759 ":d8", 5760 ":mksnapshot", 5761 ":torque_base", 5762 ":torque_ls_base", 5763 ":v8_base_without_compiler", 5764 ":v8_bigint", 5765 ":v8_headers", 5766 ":v8_initializers", 5767 ":v8_internal_headers", 5768 ":v8_libbase", 5769 ":v8_maybe_icu", 5770 ":v8_version", 5771 ":wee8", 5772 "src/inspector:inspector", 5773 "src/inspector:inspector_string_conversions", 5774 ] 5775 } 5776} 5777 5778############################################################################### 5779# Produce a single static library for embedders 5780# 5781 5782if (v8_monolithic) { 5783 # A component build is not monolithic. 5784 assert(!is_component_build) 5785 5786 # Using external startup data would produce separate files. 5787 assert(!v8_use_external_startup_data) 5788 v8_static_library("v8_monolith") { 5789 deps = [ 5790 ":v8", 5791 ":v8_libbase", 5792 ":v8_libplatform", 5793 "//build/win:default_exe_manifest", 5794 ] 5795 5796 configs = [ ":internal_config" ] 5797 } 5798} 5799 5800if (v8_enable_webassembly) { 5801 v8_static_library("wee8") { 5802 deps = [ 5803 ":v8_base", 5804 ":v8_libbase", 5805 ":v8_libplatform", 5806 ":v8_shared_internal_headers", 5807 ":v8_snapshot", 5808 "//build/win:default_exe_manifest", 5809 ] 5810 5811 # TODO: v8dll-main.cc equivalent for shared library builds 5812 5813 configs = [ ":internal_config" ] 5814 5815 sources = [ 5816 ### gcmole(all) ### 5817 "src/wasm/c-api.cc", 5818 "src/wasm/c-api.h", 5819 "third_party/wasm-api/wasm.h", 5820 "third_party/wasm-api/wasm.hh", 5821 ] 5822 } 5823} 5824 5825############################################################################### 5826# Executables 5827# 5828 5829if (current_toolchain == v8_generator_toolchain) { 5830 v8_executable("bytecode_builtins_list_generator") { 5831 visibility = [ ":*" ] # Only targets in this file can depend on this. 5832 5833 include_dirs = [ "." ] 5834 5835 sources = [ 5836 "src/builtins/generate-bytecodes-builtins-list.cc", 5837 "src/interpreter/bytecode-operands.cc", 5838 "src/interpreter/bytecode-operands.h", 5839 "src/interpreter/bytecode-traits.h", 5840 "src/interpreter/bytecodes.cc", 5841 "src/interpreter/bytecodes.h", 5842 ] 5843 5844 configs = [ ":internal_config" ] 5845 5846 deps = [ 5847 ":v8_libbase", 5848 ":v8_shared_internal_headers", 5849 "//build/win:default_exe_manifest", 5850 ] 5851 } 5852} 5853 5854if (current_toolchain == v8_snapshot_toolchain) { 5855 v8_executable("mksnapshot") { 5856 visibility = [ ":*" ] # Only targets in this file can depend on this. 5857 5858 sources = [ 5859 "src/snapshot/embedded/embedded-empty.cc", 5860 "src/snapshot/embedded/embedded-file-writer.cc", 5861 "src/snapshot/embedded/embedded-file-writer.h", 5862 "src/snapshot/embedded/platform-embedded-file-writer-aix.cc", 5863 "src/snapshot/embedded/platform-embedded-file-writer-aix.h", 5864 "src/snapshot/embedded/platform-embedded-file-writer-base.cc", 5865 "src/snapshot/embedded/platform-embedded-file-writer-base.h", 5866 "src/snapshot/embedded/platform-embedded-file-writer-generic.cc", 5867 "src/snapshot/embedded/platform-embedded-file-writer-generic.h", 5868 "src/snapshot/embedded/platform-embedded-file-writer-mac.cc", 5869 "src/snapshot/embedded/platform-embedded-file-writer-mac.h", 5870 "src/snapshot/embedded/platform-embedded-file-writer-win.cc", 5871 "src/snapshot/embedded/platform-embedded-file-writer-win.h", 5872 "src/snapshot/mksnapshot.cc", 5873 "src/snapshot/snapshot-empty.cc", 5874 ] 5875 5876 if (v8_control_flow_integrity) { 5877 sources += [ "src/deoptimizer/deoptimizer-cfi-empty.cc" ] 5878 } 5879 5880 configs = [ ":internal_config" ] 5881 5882 deps = [ 5883 ":v8_base_without_compiler", 5884 ":v8_compiler_for_mksnapshot", 5885 ":v8_init", 5886 ":v8_libbase", 5887 ":v8_libplatform", 5888 ":v8_maybe_icu", 5889 ":v8_shared_internal_headers", 5890 ":v8_tracing", 5891 "//build/win:default_exe_manifest", 5892 ] 5893 } 5894} 5895 5896if (current_toolchain == v8_snapshot_toolchain) { 5897 v8_executable("torque") { 5898 visibility = [ ":*" ] # Only targets in this file can depend on this. 5899 5900 sources = [ "src/torque/torque.cc" ] 5901 5902 deps = [ 5903 ":torque_base", 5904 "//build/win:default_exe_manifest", 5905 ] 5906 5907 # The use of exceptions for Torque in violation of the Chromium style-guide 5908 # is justified by the fact that it is only used from the non-essential 5909 # language server and can be removed anytime if it causes problems. 5910 configs = [ 5911 ":internal_config", 5912 "//build/config/compiler:exceptions", 5913 "//build/config/compiler:rtti", 5914 ] 5915 5916 remove_configs = [ 5917 "//build/config/compiler:no_exceptions", 5918 "//build/config/compiler:no_rtti", 5919 ] 5920 5921 if (is_win && is_asan) { 5922 remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] 5923 } 5924 } 5925} 5926 5927v8_executable("torque-language-server") { 5928 visibility = [ ":*" ] # Only targets in this file can depend on this. 5929 5930 sources = [ "src/torque/ls/torque-language-server.cc" ] 5931 5932 deps = [ 5933 ":torque_base", 5934 ":torque_ls_base", 5935 "//build/win:default_exe_manifest", 5936 ] 5937 5938 # The use of exceptions for Torque in violation of the Chromium style-guide 5939 # is justified by the fact that it is only used from the non-essential 5940 # language server and can be removed anytime if it causes problems. 5941 configs = [ 5942 ":internal_config", 5943 "//build/config/compiler:exceptions", 5944 "//build/config/compiler:rtti", 5945 ] 5946 5947 remove_configs = [ 5948 "//build/config/compiler:no_exceptions", 5949 "//build/config/compiler:no_rtti", 5950 ] 5951 5952 if (is_win && is_asan) { 5953 remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ] 5954 } 5955} 5956 5957if (v8_enable_i18n_support) { 5958 if (current_toolchain == v8_generator_toolchain) { 5959 v8_executable("gen-regexp-special-case") { 5960 visibility = [ ":*" ] # Only targets in this file can depend on this. 5961 5962 sources = [ 5963 "src/regexp/gen-regexp-special-case.cc", 5964 "src/regexp/special-case.h", 5965 ] 5966 5967 deps = [ 5968 ":v8_libbase", 5969 ":v8_shared_internal_headers", 5970 "//build/win:default_exe_manifest", 5971 "//third_party/icu", 5972 ] 5973 5974 configs = [ ":internal_config" ] 5975 } 5976 } 5977 5978 action("run_gen-regexp-special-case") { 5979 visibility = [ ":*" ] # Only targets in this file can depend on this. 5980 5981 script = "tools/run.py" 5982 5983 deps = [ ":gen-regexp-special-case($v8_generator_toolchain)" ] 5984 5985 output_file = "$target_gen_dir/src/regexp/special-case.cc" 5986 5987 outputs = [ output_file ] 5988 5989 args = [ 5990 "./" + rebase_path( 5991 get_label_info( 5992 ":gen-regexp-special-case($v8_generator_toolchain)", 5993 "root_out_dir") + "/gen-regexp-special-case", 5994 root_build_dir), 5995 rebase_path(output_file, root_build_dir), 5996 ] 5997 } 5998} 5999 6000############################################################################### 6001# Public targets 6002# 6003 6004want_v8_shell = 6005 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || 6006 (current_toolchain == v8_snapshot_toolchain && 6007 v8_toolset_for_shell == "host") || 6008 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target") 6009 6010group("gn_all") { 6011 testonly = true 6012 6013 deps = [ 6014 ":d8", 6015 ":v8_fuzzers", 6016 ":v8_hello_world", 6017 ":v8_sample_process", 6018 "test:gn_all", 6019 "tools:gn_all", 6020 ] 6021 6022 if (v8_custom_deps != "") { 6023 # Custom dependency from directory under v8/custom_deps. 6024 deps += [ v8_custom_deps ] 6025 } 6026 6027 if (want_v8_shell) { 6028 deps += [ ":v8_shell" ] 6029 } 6030 6031 if (v8_check_header_includes) { 6032 deps += [ ":check_headers" ] 6033 } 6034} 6035 6036group("v8_python_base") { 6037 data = [ ".vpython" ] 6038} 6039 6040group("v8_clusterfuzz") { 6041 testonly = true 6042 6043 deps = [ 6044 ":d8", 6045 ":v8_simple_inspector_fuzzer", 6046 "tools/clusterfuzz/trials:v8_clusterfuzz_resources", 6047 ] 6048 6049 if (v8_multi_arch_build) { 6050 deps += [ 6051 ":d8(//build/toolchain/linux:clang_x64)", 6052 ":d8(//build/toolchain/linux:clang_x64_v8_arm64)", 6053 ":d8(//build/toolchain/linux:clang_x86)", 6054 ":d8(//build/toolchain/linux:clang_x86_v8_arm)", 6055 ":d8(tools/clusterfuzz/foozzie/toolchain:clang_x64_pointer_compression)", 6056 ] 6057 } 6058} 6059 6060group("v8_archive") { 6061 testonly = true 6062 6063 deps = [ ":d8" ] 6064 6065 if (!is_win) { 6066 # On windows, cctest doesn't link with v8_static_library. 6067 deps += [ "test/cctest:cctest" ] 6068 } 6069} 6070 6071# TODO(dglazkov): Remove the "!build_with_chromium" condition once this clause 6072# is removed from Chromium. 6073if (is_fuchsia && !build_with_chromium) { 6074 import("//build/config/fuchsia/rules.gni") 6075 6076 cr_fuchsia_package("d8_fuchsia_pkg") { 6077 testonly = true 6078 binary = ":d8" 6079 manifest = "gni/v8.cmx" 6080 package_name_override = "d8" 6081 } 6082 6083 fuchsia_package_runner("d8_fuchsia") { 6084 testonly = true 6085 package = ":d8_fuchsia_pkg" 6086 package_name_override = "d8" 6087 } 6088} 6089 6090group("v8_fuzzers") { 6091 testonly = true 6092 data_deps = [ 6093 ":v8_simple_inspector_fuzzer", 6094 ":v8_simple_json_fuzzer", 6095 ":v8_simple_parser_fuzzer", 6096 ":v8_simple_regexp_builtins_fuzzer", 6097 ":v8_simple_regexp_fuzzer", 6098 ] 6099 6100 if (v8_enable_webassembly) { 6101 data_deps += [ 6102 ":v8_simple_multi_return_fuzzer", 6103 ":v8_simple_wasm_async_fuzzer", 6104 ":v8_simple_wasm_code_fuzzer", 6105 ":v8_simple_wasm_compile_fuzzer", 6106 ":v8_simple_wasm_fuzzer", 6107 ] 6108 } 6109} 6110 6111if (is_component_build) { 6112 v8_component("v8") { 6113 sources = [ "src/utils/v8dll-main.cc" ] 6114 6115 public_deps = [ 6116 ":v8_base", 6117 ":v8_snapshot", 6118 ] 6119 6120 configs = [ ":internal_config" ] 6121 6122 public_configs = [ ":external_config" ] 6123 } 6124 6125 v8_component("v8_for_testing") { 6126 testonly = true 6127 6128 sources = [ "src/utils/v8dll-main.cc" ] 6129 6130 public_deps = [ 6131 ":torque_base", 6132 ":torque_ls_base", 6133 ":v8_base", 6134 ":v8_headers", 6135 ":v8_initializers", 6136 ":v8_snapshot", 6137 ] 6138 6139 configs = [ ":internal_config" ] 6140 6141 public_configs = [ ":external_config" ] 6142 } 6143 6144 v8_component("cppgc") { 6145 public_deps = [ ":cppgc_base" ] 6146 6147 if (!cppgc_is_standalone) { 6148 deps = [ ":v8" ] 6149 } 6150 6151 configs = [] 6152 public_configs = [ ":external_config" ] 6153 } 6154 6155 if (cppgc_is_standalone) { 6156 v8_component("cppgc_for_testing") { 6157 testonly = true 6158 6159 public_deps = [ ":cppgc_base" ] 6160 6161 configs = [] 6162 public_configs = [ ":external_config" ] 6163 } 6164 } 6165 6166 v8_component("v8_heap_base_for_testing") { 6167 testonly = true 6168 6169 public_deps = [ ":v8_heap_base" ] 6170 6171 configs = [] 6172 public_configs = [ ":external_config" ] 6173 } 6174} else { 6175 group("v8") { 6176 public_deps = [ 6177 ":v8_base", 6178 ":v8_snapshot", 6179 ] 6180 6181 public_configs = [ ":external_config" ] 6182 } 6183 6184 group("v8_for_testing") { 6185 testonly = true 6186 6187 public_deps = [ 6188 ":torque_base", 6189 ":torque_ls_base", 6190 ":v8_base", 6191 ":v8_initializers", 6192 ":v8_snapshot", 6193 ] 6194 6195 public_configs = [ ":external_config" ] 6196 } 6197 6198 group("cppgc") { 6199 public_deps = [ ":cppgc_base" ] 6200 6201 if (!cppgc_is_standalone) { 6202 deps = [ ":v8" ] 6203 } 6204 6205 public_configs = [ ":external_config" ] 6206 } 6207 6208 if (cppgc_is_standalone) { 6209 group("cppgc_for_testing") { 6210 testonly = true 6211 6212 public_deps = [ ":cppgc_base" ] 6213 6214 public_configs = [ ":external_config" ] 6215 } 6216 } 6217 6218 group("v8_heap_base_for_testing") { 6219 testonly = true 6220 6221 public_deps = [ ":v8_heap_base" ] 6222 6223 public_configs = [ ":external_config" ] 6224 } 6225} 6226 6227v8_executable("d8") { 6228 sources = [ 6229 "src/d8/async-hooks-wrapper.cc", 6230 "src/d8/async-hooks-wrapper.h", 6231 "src/d8/d8-console.cc", 6232 "src/d8/d8-console.h", 6233 "src/d8/d8-js.cc", 6234 "src/d8/d8-platforms.cc", 6235 "src/d8/d8-platforms.h", 6236 "src/d8/d8-test.cc", 6237 "src/d8/d8.cc", 6238 "src/d8/d8.h", 6239 ] 6240 6241 if (v8_fuzzilli) { 6242 sources += [ 6243 "src/d8/cov.cc", 6244 "src/d8/cov.h", 6245 ] 6246 } 6247 6248 configs = [ 6249 # Note: don't use :internal_config here because this target will get 6250 # the :external_config applied to it by virtue of depending on :v8, and 6251 # you can't have both applied to the same target. 6252 ":internal_config_base", 6253 ":v8_tracing_config", 6254 ] 6255 6256 deps = [ 6257 ":v8", 6258 ":v8_libbase", 6259 ":v8_libplatform", 6260 ":v8_tracing", 6261 "//build/win:default_exe_manifest", 6262 ] 6263 6264 if (is_posix || is_fuchsia) { 6265 sources += [ "src/d8/d8-posix.cc" ] 6266 } else if (is_win) { 6267 sources += [ "src/d8/d8-windows.cc" ] 6268 } 6269 6270 if (v8_correctness_fuzzer) { 6271 deps += [ "tools/clusterfuzz/foozzie:v8_correctness_fuzzer_resources" ] 6272 } 6273 6274 defines = [] 6275 6276 if (v8_enable_vtunejit) { 6277 deps += [ "src/third_party/vtune:v8_vtune" ] 6278 } 6279} 6280 6281v8_executable("v8_hello_world") { 6282 sources = [ "samples/hello-world.cc" ] 6283 6284 configs = [ 6285 # Note: don't use :internal_config here because this target will get 6286 # the :external_config applied to it by virtue of depending on :v8, and 6287 # you can't have both applied to the same target. 6288 ":internal_config_base", 6289 ] 6290 6291 deps = [ 6292 ":v8", 6293 ":v8_libbase", 6294 ":v8_libplatform", 6295 "//build/win:default_exe_manifest", 6296 ] 6297} 6298 6299v8_executable("v8_sample_process") { 6300 sources = [ "samples/process.cc" ] 6301 6302 configs = [ 6303 # Note: don't use :internal_config here because this target will get 6304 # the :external_config applied to it by virtue of depending on :v8, and 6305 # you can't have both applied to the same target. 6306 ":internal_config_base", 6307 ] 6308 6309 deps = [ 6310 ":v8", 6311 ":v8_libbase", 6312 ":v8_libplatform", 6313 "//build/win:default_exe_manifest", 6314 ] 6315} 6316 6317if (want_v8_shell) { 6318 v8_executable("v8_shell") { 6319 sources = [ "samples/shell.cc" ] 6320 6321 configs = [ 6322 # Note: don't use :internal_config here because this target will get 6323 # the :external_config applied to it by virtue of depending on :v8, and 6324 # you can't have both applied to the same target. 6325 ":internal_config_base", 6326 ] 6327 6328 deps = [ 6329 ":v8", 6330 ":v8_libbase", 6331 ":v8_libplatform", 6332 "//build/win:default_exe_manifest", 6333 ] 6334 } 6335} 6336 6337v8_executable("cppgc_hello_world") { 6338 sources = [ "samples/cppgc/hello-world.cc" ] 6339 6340 if (v8_current_cpu == "riscv64") { 6341 libs = [ "atomic" ] 6342 } 6343 6344 configs = [ 6345 # Note: don't use :internal_config here because this target will get 6346 # the :external_config applied to it by virtue of depending on :cppgc, and 6347 # you can't have both applied to the same target. 6348 ":internal_config_base", 6349 ":cppgc_base_config", 6350 ] 6351 6352 deps = [ ":cppgc" ] 6353 if (!cppgc_is_standalone) { 6354 deps += [ 6355 ":v8", 6356 "//build/win:default_exe_manifest", 6357 ] 6358 } 6359} 6360 6361template("v8_fuzzer") { 6362 name = target_name 6363 forward_variables_from(invoker, "*") 6364 v8_executable("v8_simple_" + name) { 6365 deps = [ 6366 ":" + name, 6367 "//build/win:default_exe_manifest", 6368 ] 6369 6370 sources = [ "test/fuzzer/fuzzer.cc" ] 6371 6372 configs = [ ":external_config" ] 6373 } 6374} 6375 6376v8_source_set("json_fuzzer") { 6377 sources = [ "test/fuzzer/json.cc" ] 6378 6379 deps = [ ":fuzzer_support" ] 6380 6381 configs = [ 6382 ":external_config", 6383 ":internal_config_base", 6384 ] 6385} 6386 6387v8_fuzzer("json_fuzzer") { 6388} 6389 6390v8_source_set("parser_fuzzer") { 6391 sources = [ "test/fuzzer/parser.cc" ] 6392 6393 deps = [ ":fuzzer_support" ] 6394 6395 configs = [ 6396 ":external_config", 6397 ":internal_config_base", 6398 ] 6399} 6400 6401v8_fuzzer("parser_fuzzer") { 6402} 6403 6404v8_source_set("regexp_builtins_fuzzer") { 6405 sources = [ 6406 "test/fuzzer/regexp-builtins.cc", 6407 "test/fuzzer/regexp_builtins/mjsunit.js.h", 6408 ] 6409 6410 deps = [ ":fuzzer_support" ] 6411 6412 configs = [ 6413 ":external_config", 6414 ":internal_config_base", 6415 ] 6416} 6417 6418v8_fuzzer("regexp_builtins_fuzzer") { 6419} 6420 6421v8_source_set("regexp_fuzzer") { 6422 sources = [ "test/fuzzer/regexp.cc" ] 6423 6424 deps = [ ":fuzzer_support" ] 6425 6426 configs = [ 6427 ":external_config", 6428 ":internal_config_base", 6429 ] 6430} 6431 6432v8_fuzzer("regexp_fuzzer") { 6433} 6434 6435if (v8_enable_webassembly) { 6436 v8_source_set("multi_return_fuzzer") { 6437 sources = [ "test/fuzzer/multi-return.cc" ] 6438 6439 deps = [ ":fuzzer_support" ] 6440 6441 configs = [ 6442 ":external_config", 6443 ":internal_config_base", 6444 ] 6445 } 6446 6447 v8_fuzzer("multi_return_fuzzer") { 6448 } 6449 6450 v8_source_set("wasm_test_common") { 6451 sources = [ 6452 "test/common/flag-utils.h", 6453 "test/common/wasm/flag-utils.h", 6454 "test/common/wasm/wasm-interpreter.cc", 6455 "test/common/wasm/wasm-interpreter.h", 6456 "test/common/wasm/wasm-module-runner.cc", 6457 "test/common/wasm/wasm-module-runner.h", 6458 ] 6459 6460 deps = [ 6461 ":generate_bytecode_builtins_list", 6462 ":run_torque", 6463 ":v8_internal_headers", 6464 ":v8_libbase", 6465 ":v8_shared_internal_headers", 6466 ":v8_tracing", 6467 ] 6468 6469 public_deps = [ ":v8_maybe_icu" ] 6470 6471 configs = [ 6472 ":external_config", 6473 ":internal_config_base", 6474 ] 6475 } 6476 6477 v8_source_set("wasm_fuzzer") { 6478 sources = [ "test/fuzzer/wasm.cc" ] 6479 6480 deps = [ 6481 ":fuzzer_support", 6482 ":lib_wasm_fuzzer_common", 6483 ":wasm_test_common", 6484 ] 6485 6486 configs = [ 6487 ":external_config", 6488 ":internal_config_base", 6489 ] 6490 } 6491 6492 v8_fuzzer("wasm_fuzzer") { 6493 } 6494 6495 v8_source_set("wasm_async_fuzzer") { 6496 sources = [ "test/fuzzer/wasm-async.cc" ] 6497 6498 deps = [ 6499 ":fuzzer_support", 6500 ":lib_wasm_fuzzer_common", 6501 ":wasm_test_common", 6502 ] 6503 6504 configs = [ 6505 ":external_config", 6506 ":internal_config_base", 6507 ] 6508 } 6509 6510 v8_fuzzer("wasm_async_fuzzer") { 6511 } 6512 6513 v8_source_set("wasm_code_fuzzer") { 6514 sources = [ 6515 "test/common/wasm/test-signatures.h", 6516 "test/fuzzer/wasm-code.cc", 6517 ] 6518 6519 deps = [ 6520 ":fuzzer_support", 6521 ":lib_wasm_fuzzer_common", 6522 ":wasm_test_common", 6523 ] 6524 6525 configs = [ 6526 ":external_config", 6527 ":internal_config_base", 6528 ] 6529 } 6530 6531 v8_fuzzer("wasm_code_fuzzer") { 6532 } 6533 6534 v8_source_set("lib_wasm_fuzzer_common") { 6535 sources = [ 6536 "test/fuzzer/wasm-fuzzer-common.cc", 6537 "test/fuzzer/wasm-fuzzer-common.h", 6538 ] 6539 6540 deps = [ 6541 ":fuzzer_support", 6542 ":generate_bytecode_builtins_list", 6543 ":run_torque", 6544 ":v8_internal_headers", 6545 ":v8_tracing", 6546 ":wasm_test_common", 6547 ] 6548 6549 public_deps = [ ":v8_maybe_icu" ] 6550 6551 configs = [ 6552 ":external_config", 6553 ":internal_config_base", 6554 ] 6555 } 6556 6557 v8_source_set("wasm_compile_fuzzer") { 6558 sources = [ 6559 "test/common/wasm/test-signatures.h", 6560 "test/fuzzer/wasm-compile.cc", 6561 ] 6562 6563 deps = [ 6564 ":fuzzer_support", 6565 ":lib_wasm_fuzzer_common", 6566 ":wasm_test_common", 6567 ] 6568 6569 configs = [ 6570 ":external_config", 6571 ":internal_config_base", 6572 ] 6573 } 6574 6575 v8_fuzzer("wasm_compile_fuzzer") { 6576 } 6577} 6578 6579v8_source_set("inspector_fuzzer") { 6580 sources = [ "test/fuzzer/inspector-fuzzer.cc" ] 6581 6582 deps = [ 6583 ":fuzzer_support", 6584 "test/inspector:inspector_test", 6585 ] 6586 6587 configs = [ 6588 ":external_config", 6589 ":internal_config_base", 6590 ] 6591} 6592 6593v8_fuzzer("inspector_fuzzer") { 6594} 6595 6596# Target to build all generated .cc files. 6597group("v8_generated_cc_files") { 6598 testonly = true 6599 6600 deps = [ 6601 ":generate_bytecode_builtins_list", 6602 ":run_torque", 6603 "src/inspector:v8_generated_cc_files", 6604 ] 6605} 6606 6607# Protobuf targets, used only when building outside of chromium. 6608 6609if (!build_with_chromium && v8_use_perfetto) { 6610 # This config is applied to the autogenerated .pb.{cc,h} files in 6611 # proto_library.gni. This config is propagated up to the source sets 6612 # that depend on generated proto headers. 6613 config("protobuf_gen_config") { 6614 defines = [ 6615 "GOOGLE_PROTOBUF_NO_RTTI", 6616 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", 6617 ] 6618 cflags = [ 6619 "-Wno-unknown-warning-option", 6620 "-Wno-deprecated", 6621 "-Wno-undef", 6622 "-Wno-zero-as-null-pointer-constant", 6623 "-Wno-thread-safety-attributes", 6624 ] 6625 include_dirs = [ "third_party/protobuf/src" ] 6626 } 6627 6628 # Configuration used to build libprotobuf_* and the protoc compiler. 6629 config("protobuf_config") { 6630 # Apply the lighter supressions and macro definitions from above. 6631 configs = [ ":protobuf_gen_config" ] 6632 6633 if (!is_win) { 6634 defines = [ "HAVE_PTHREAD=1" ] 6635 } 6636 if (is_clang) { 6637 cflags = [ 6638 "-Wno-unused-private-field", 6639 "-Wno-unused-function", 6640 "-Wno-inconsistent-missing-override", 6641 "-Wno-unknown-warning-option", 6642 "-Wno-enum-compare-switch", 6643 "-Wno-user-defined-warnings", 6644 "-Wno-tautological-constant-compare", 6645 ] 6646 } 6647 if (is_win && is_clang) { 6648 cflags += [ "-Wno-microsoft-unqualified-friend" ] 6649 } 6650 } 6651 6652 source_set("protobuf_lite") { 6653 sources = [ 6654 "third_party/protobuf/src/google/protobuf/any_lite.cc", 6655 "third_party/protobuf/src/google/protobuf/arena.cc", 6656 "third_party/protobuf/src/google/protobuf/arena.h", 6657 "third_party/protobuf/src/google/protobuf/arena_impl.h", 6658 "third_party/protobuf/src/google/protobuf/arenastring.h", 6659 "third_party/protobuf/src/google/protobuf/extension_set.cc", 6660 "third_party/protobuf/src/google/protobuf/extension_set.h", 6661 "third_party/protobuf/src/google/protobuf/generated_enum_util.cc", 6662 "third_party/protobuf/src/google/protobuf/generated_enum_util.h", 6663 "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.cc", 6664 "third_party/protobuf/src/google/protobuf/generated_message_table_driven_lite.h", 6665 "third_party/protobuf/src/google/protobuf/generated_message_util.cc", 6666 "third_party/protobuf/src/google/protobuf/generated_message_util.h", 6667 "third_party/protobuf/src/google/protobuf/has_bits.h", 6668 "third_party/protobuf/src/google/protobuf/implicit_weak_message.cc", 6669 "third_party/protobuf/src/google/protobuf/implicit_weak_message.h", 6670 "third_party/protobuf/src/google/protobuf/inlined_string_field.h", 6671 "third_party/protobuf/src/google/protobuf/io/coded_stream.cc", 6672 "third_party/protobuf/src/google/protobuf/io/coded_stream.h", 6673 "third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h", 6674 "third_party/protobuf/src/google/protobuf/io/io_win32.cc", 6675 "third_party/protobuf/src/google/protobuf/io/io_win32.h", 6676 "third_party/protobuf/src/google/protobuf/io/strtod.cc", 6677 "third_party/protobuf/src/google/protobuf/io/strtod.h", 6678 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc", 6679 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h", 6680 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", 6681 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h", 6682 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 6683 "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h", 6684 "third_party/protobuf/src/google/protobuf/map.h", 6685 "third_party/protobuf/src/google/protobuf/map_entry_lite.h", 6686 "third_party/protobuf/src/google/protobuf/map_field_lite.h", 6687 "third_party/protobuf/src/google/protobuf/map_type_handler.h", 6688 "third_party/protobuf/src/google/protobuf/message_lite.cc", 6689 "third_party/protobuf/src/google/protobuf/message_lite.h", 6690 "third_party/protobuf/src/google/protobuf/repeated_field.cc", 6691 "third_party/protobuf/src/google/protobuf/repeated_field.h", 6692 "third_party/protobuf/src/google/protobuf/stubs/bytestream.cc", 6693 "third_party/protobuf/src/google/protobuf/stubs/bytestream.h", 6694 "third_party/protobuf/src/google/protobuf/stubs/callback.h", 6695 "third_party/protobuf/src/google/protobuf/stubs/casts.h", 6696 "third_party/protobuf/src/google/protobuf/stubs/common.cc", 6697 "third_party/protobuf/src/google/protobuf/stubs/common.h", 6698 "third_party/protobuf/src/google/protobuf/stubs/fastmem.h", 6699 "third_party/protobuf/src/google/protobuf/stubs/hash.h", 6700 "third_party/protobuf/src/google/protobuf/stubs/int128.cc", 6701 "third_party/protobuf/src/google/protobuf/stubs/int128.h", 6702 "third_party/protobuf/src/google/protobuf/stubs/logging.h", 6703 "third_party/protobuf/src/google/protobuf/stubs/macros.h", 6704 "third_party/protobuf/src/google/protobuf/stubs/map_util.h", 6705 "third_party/protobuf/src/google/protobuf/stubs/mutex.h", 6706 "third_party/protobuf/src/google/protobuf/stubs/once.h", 6707 "third_party/protobuf/src/google/protobuf/stubs/platform_macros.h", 6708 "third_party/protobuf/src/google/protobuf/stubs/port.h", 6709 "third_party/protobuf/src/google/protobuf/stubs/status.cc", 6710 "third_party/protobuf/src/google/protobuf/stubs/status.h", 6711 "third_party/protobuf/src/google/protobuf/stubs/status_macros.h", 6712 "third_party/protobuf/src/google/protobuf/stubs/statusor.cc", 6713 "third_party/protobuf/src/google/protobuf/stubs/statusor.h", 6714 "third_party/protobuf/src/google/protobuf/stubs/stl_util.h", 6715 "third_party/protobuf/src/google/protobuf/stubs/stringpiece.cc", 6716 "third_party/protobuf/src/google/protobuf/stubs/stringpiece.h", 6717 "third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc", 6718 "third_party/protobuf/src/google/protobuf/stubs/stringprintf.h", 6719 "third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc", 6720 "third_party/protobuf/src/google/protobuf/stubs/strutil.cc", 6721 "third_party/protobuf/src/google/protobuf/stubs/strutil.h", 6722 "third_party/protobuf/src/google/protobuf/stubs/template_util.h", 6723 "third_party/protobuf/src/google/protobuf/stubs/time.cc", 6724 "third_party/protobuf/src/google/protobuf/stubs/time.h", 6725 "third_party/protobuf/src/google/protobuf/wire_format_lite.cc", 6726 "third_party/protobuf/src/google/protobuf/wire_format_lite.h", 6727 ] 6728 configs -= [ "//build/config/compiler:chromium_code" ] 6729 configs += [ 6730 "//build/config/compiler:no_chromium_code", 6731 ":protobuf_config", 6732 ] 6733 if (is_win) { 6734 configs -= [ "//build/config/win:lean_and_mean" ] 6735 } 6736 public_configs = [ ":protobuf_gen_config" ] 6737 } 6738 6739 # This target should be used only by the protoc compiler and by test targets. 6740 source_set("protobuf_full") { 6741 deps = [ ":protobuf_lite" ] 6742 sources = [ 6743 "third_party/protobuf/src/google/protobuf/any.cc", 6744 "third_party/protobuf/src/google/protobuf/any.h", 6745 "third_party/protobuf/src/google/protobuf/any.pb.cc", 6746 "third_party/protobuf/src/google/protobuf/any.pb.h", 6747 "third_party/protobuf/src/google/protobuf/api.pb.cc", 6748 "third_party/protobuf/src/google/protobuf/api.pb.h", 6749 "third_party/protobuf/src/google/protobuf/compiler/importer.cc", 6750 "third_party/protobuf/src/google/protobuf/compiler/importer.h", 6751 "third_party/protobuf/src/google/protobuf/compiler/parser.cc", 6752 "third_party/protobuf/src/google/protobuf/compiler/parser.h", 6753 "third_party/protobuf/src/google/protobuf/descriptor.cc", 6754 "third_party/protobuf/src/google/protobuf/descriptor.h", 6755 "third_party/protobuf/src/google/protobuf/descriptor.pb.cc", 6756 "third_party/protobuf/src/google/protobuf/descriptor.pb.h", 6757 "third_party/protobuf/src/google/protobuf/descriptor_database.cc", 6758 "third_party/protobuf/src/google/protobuf/descriptor_database.h", 6759 "third_party/protobuf/src/google/protobuf/duration.pb.cc", 6760 "third_party/protobuf/src/google/protobuf/duration.pb.h", 6761 "third_party/protobuf/src/google/protobuf/dynamic_message.cc", 6762 "third_party/protobuf/src/google/protobuf/dynamic_message.h", 6763 "third_party/protobuf/src/google/protobuf/empty.pb.cc", 6764 "third_party/protobuf/src/google/protobuf/empty.pb.h", 6765 "third_party/protobuf/src/google/protobuf/extension_set_heavy.cc", 6766 "third_party/protobuf/src/google/protobuf/field_mask.pb.cc", 6767 "third_party/protobuf/src/google/protobuf/field_mask.pb.h", 6768 "third_party/protobuf/src/google/protobuf/generated_enum_reflection.h", 6769 "third_party/protobuf/src/google/protobuf/generated_message_reflection.cc", 6770 "third_party/protobuf/src/google/protobuf/generated_message_reflection.h", 6771 "third_party/protobuf/src/google/protobuf/io/gzip_stream.cc", 6772 "third_party/protobuf/src/google/protobuf/io/gzip_stream.h", 6773 "third_party/protobuf/src/google/protobuf/io/printer.cc", 6774 "third_party/protobuf/src/google/protobuf/io/printer.h", 6775 "third_party/protobuf/src/google/protobuf/io/tokenizer.cc", 6776 "third_party/protobuf/src/google/protobuf/io/tokenizer.h", 6777 "third_party/protobuf/src/google/protobuf/map_entry.h", 6778 "third_party/protobuf/src/google/protobuf/map_field.cc", 6779 "third_party/protobuf/src/google/protobuf/map_field.h", 6780 "third_party/protobuf/src/google/protobuf/map_field_inl.h", 6781 "third_party/protobuf/src/google/protobuf/message.cc", 6782 "third_party/protobuf/src/google/protobuf/message.h", 6783 "third_party/protobuf/src/google/protobuf/metadata.h", 6784 "third_party/protobuf/src/google/protobuf/reflection.h", 6785 "third_party/protobuf/src/google/protobuf/reflection_internal.h", 6786 "third_party/protobuf/src/google/protobuf/reflection_ops.cc", 6787 "third_party/protobuf/src/google/protobuf/reflection_ops.h", 6788 "third_party/protobuf/src/google/protobuf/service.cc", 6789 "third_party/protobuf/src/google/protobuf/service.h", 6790 "third_party/protobuf/src/google/protobuf/source_context.pb.cc", 6791 "third_party/protobuf/src/google/protobuf/source_context.pb.h", 6792 "third_party/protobuf/src/google/protobuf/struct.pb.cc", 6793 "third_party/protobuf/src/google/protobuf/struct.pb.h", 6794 "third_party/protobuf/src/google/protobuf/stubs/mathlimits.cc", 6795 "third_party/protobuf/src/google/protobuf/stubs/mathlimits.h", 6796 "third_party/protobuf/src/google/protobuf/stubs/mathutil.h", 6797 "third_party/protobuf/src/google/protobuf/stubs/substitute.cc", 6798 "third_party/protobuf/src/google/protobuf/stubs/substitute.h", 6799 "third_party/protobuf/src/google/protobuf/text_format.cc", 6800 "third_party/protobuf/src/google/protobuf/text_format.h", 6801 "third_party/protobuf/src/google/protobuf/timestamp.pb.cc", 6802 "third_party/protobuf/src/google/protobuf/timestamp.pb.h", 6803 "third_party/protobuf/src/google/protobuf/type.pb.cc", 6804 "third_party/protobuf/src/google/protobuf/type.pb.h", 6805 "third_party/protobuf/src/google/protobuf/unknown_field_set.cc", 6806 "third_party/protobuf/src/google/protobuf/unknown_field_set.h", 6807 "third_party/protobuf/src/google/protobuf/util/field_comparator.cc", 6808 "third_party/protobuf/src/google/protobuf/util/field_comparator.h", 6809 "third_party/protobuf/src/google/protobuf/util/field_mask_util.cc", 6810 "third_party/protobuf/src/google/protobuf/util/field_mask_util.h", 6811 "third_party/protobuf/src/google/protobuf/util/internal/constants.h", 6812 "third_party/protobuf/src/google/protobuf/util/internal/datapiece.cc", 6813 "third_party/protobuf/src/google/protobuf/util/internal/datapiece.h", 6814 "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc", 6815 "third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h", 6816 "third_party/protobuf/src/google/protobuf/util/internal/error_listener.cc", 6817 "third_party/protobuf/src/google/protobuf/util/internal/error_listener.h", 6818 "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc", 6819 "third_party/protobuf/src/google/protobuf/util/internal/field_mask_utility.h", 6820 "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.cc", 6821 "third_party/protobuf/src/google/protobuf/util/internal/json_escaping.h", 6822 "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc", 6823 "third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h", 6824 "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc", 6825 "third_party/protobuf/src/google/protobuf/util/internal/json_stream_parser.h", 6826 "third_party/protobuf/src/google/protobuf/util/internal/location_tracker.h", 6827 "third_party/protobuf/src/google/protobuf/util/internal/object_location_tracker.h", 6828 "third_party/protobuf/src/google/protobuf/util/internal/object_source.h", 6829 "third_party/protobuf/src/google/protobuf/util/internal/object_writer.cc", 6830 "third_party/protobuf/src/google/protobuf/util/internal/object_writer.h", 6831 "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.cc", 6832 "third_party/protobuf/src/google/protobuf/util/internal/proto_writer.h", 6833 "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc", 6834 "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectsource.h", 6835 "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc", 6836 "third_party/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h", 6837 "third_party/protobuf/src/google/protobuf/util/internal/structured_objectwriter.h", 6838 "third_party/protobuf/src/google/protobuf/util/internal/type_info.cc", 6839 "third_party/protobuf/src/google/protobuf/util/internal/type_info.h", 6840 "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc", 6841 "third_party/protobuf/src/google/protobuf/util/internal/type_info_test_helper.h", 6842 "third_party/protobuf/src/google/protobuf/util/internal/utility.cc", 6843 "third_party/protobuf/src/google/protobuf/util/internal/utility.h", 6844 "third_party/protobuf/src/google/protobuf/util/json_util.cc", 6845 "third_party/protobuf/src/google/protobuf/util/json_util.h", 6846 "third_party/protobuf/src/google/protobuf/util/message_differencer.cc", 6847 "third_party/protobuf/src/google/protobuf/util/message_differencer.h", 6848 "third_party/protobuf/src/google/protobuf/util/time_util.cc", 6849 "third_party/protobuf/src/google/protobuf/util/time_util.h", 6850 "third_party/protobuf/src/google/protobuf/util/type_resolver.h", 6851 "third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc", 6852 "third_party/protobuf/src/google/protobuf/util/type_resolver_util.h", 6853 "third_party/protobuf/src/google/protobuf/wire_format.cc", 6854 "third_party/protobuf/src/google/protobuf/wire_format.h", 6855 "third_party/protobuf/src/google/protobuf/wrappers.pb.cc", 6856 "third_party/protobuf/src/google/protobuf/wrappers.pb.h", 6857 ] 6858 configs -= [ "//build/config/compiler:chromium_code" ] 6859 configs += [ 6860 "//build/config/compiler:no_chromium_code", 6861 ":protobuf_config", 6862 ] 6863 if (is_win) { 6864 configs -= [ "//build/config/win:lean_and_mean" ] 6865 } 6866 public_configs = [ ":protobuf_gen_config" ] 6867 } 6868 6869 if (current_toolchain == host_toolchain) { 6870 source_set("protoc_lib") { 6871 deps = [ ":protobuf_full" ] 6872 sources = [ 6873 "third_party/protobuf/src/google/protobuf/compiler/code_generator.cc", 6874 "third_party/protobuf/src/google/protobuf/compiler/code_generator.h", 6875 "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc", 6876 "third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h", 6877 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc", 6878 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h", 6879 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 6880 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h", 6881 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc", 6882 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h", 6883 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc", 6884 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h", 6885 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc", 6886 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h", 6887 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc", 6888 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h", 6889 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc", 6890 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h", 6891 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc", 6892 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h", 6893 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc", 6894 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h", 6895 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc", 6896 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h", 6897 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h", 6898 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h", 6899 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", 6900 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h", 6901 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", 6902 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h", 6903 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc", 6904 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h", 6905 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc", 6906 "third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h", 6907 "third_party/protobuf/src/google/protobuf/compiler/plugin.cc", 6908 "third_party/protobuf/src/google/protobuf/compiler/plugin.h", 6909 "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc", 6910 "third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h", 6911 "third_party/protobuf/src/google/protobuf/compiler/subprocess.cc", 6912 "third_party/protobuf/src/google/protobuf/compiler/subprocess.h", 6913 "third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc", 6914 "third_party/protobuf/src/google/protobuf/compiler/zip_writer.h", 6915 ] 6916 configs -= [ "//build/config/compiler:chromium_code" ] 6917 configs += [ 6918 "//build/config/compiler:no_chromium_code", 6919 ":protobuf_config", 6920 ] 6921 if (is_win) { 6922 configs -= [ "//build/config/win:lean_and_mean" ] 6923 } 6924 public_configs = [ ":protobuf_gen_config" ] 6925 } 6926 6927 executable("protoc") { 6928 deps = [ 6929 ":protoc_lib", 6930 "//build/win:default_exe_manifest", 6931 ] 6932 sources = [ "src/protobuf/protobuf-compiler-main.cc" ] 6933 configs -= [ "//build/config/compiler:chromium_code" ] 6934 configs += [ "//build/config/compiler:no_chromium_code" ] 6935 } 6936 } # host_toolchain 6937 6938 v8_component("v8_libperfetto") { 6939 configs = [ ":v8_tracing_config" ] 6940 public_configs = [ "//third_party/perfetto/gn:public_config" ] 6941 deps = [ 6942 "//third_party/perfetto/src/trace_processor:storage_minimal", 6943 "//third_party/perfetto/src/tracing/core", 6944 6945 # TODO(skyostil): Support non-POSIX platforms. 6946 "//third_party/perfetto/protos/perfetto/config:cpp", 6947 "//third_party/perfetto/protos/perfetto/trace/track_event:zero", 6948 "//third_party/perfetto/src/tracing:in_process_backend", 6949 "//third_party/perfetto/src/tracing:platform_impl", 6950 ] 6951 6952 public_deps = [ 6953 "//third_party/perfetto/include/perfetto/trace_processor", 6954 "//third_party/perfetto/src/trace_processor:export_json", 6955 "//third_party/perfetto/src/tracing:client_api", 6956 ] 6957 } 6958} # if (!build_with_chromium && v8_use_perfetto) 6959