GeezerVison is showing github.com — build,src,tools: adapt build config for V8 13.3 · nodejs/node@756abac
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: configure.py -7Lines changed: 0 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 640 | 640 | default=None, | 641 | 641 | help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)') | 642 | 642 |
| 643 | | -parser.add_argument('--disable-shared-readonly-heap', | 644 | | - action='store_true', | 645 | | - dest='disable_shared_ro_heap', | 646 | | - default=None, | 647 | | - help='Disable the shared read-only heap feature in V8') | 648 | | - | 649 | 643 | parser.add_argument('--v8-options', | 650 | 644 | action='store', | 651 | 645 | dest='v8_options', | @@ -1720,7 +1714,6 @@ def configure_v8(o, configs): | 1720 | 1714 | o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 | 1721 | 1715 | o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0 | 1722 | 1716 | o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 | 1723 | | - o['variables']['v8_enable_shared_ro_heap'] = 0 if options.disable_shared_ro_heap else 1 | 1724 | 1717 | o['variables']['v8_enable_extensible_ro_snapshot'] = 0 | 1725 | 1718 | o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 | 1726 | 1719 | o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) | |
Collapse file Copy file name to clipboardExpand all lines: node.gypi -3Lines changed: 0 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 100 | 100 | 'NODE_USE_V8_PLATFORM=0', | 101 | 101 | ], | 102 | 102 | }], | 103 | | - [ 'v8_enable_shared_ro_heap==1', { | 104 | | - 'defines': ['NODE_V8_SHARED_RO_HEAP',], | 105 | | - }], | 106 | 103 | [ 'node_tag!=""', { | 107 | 104 | 'defines': [ 'NODE_TAG="<(node_tag)"' ], | 108 | 105 | }], | |
Collapse file Copy file name to clipboardExpand all lines: src/api/embed_helpers.cc -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -352,11 +352,7 @@ EmbedderSnapshotData::EmbedderSnapshotData(const SnapshotData* impl, | 352 | 352 | : impl_(impl), owns_impl_(owns_impl) {} | 353 | 353 |
| 354 | 354 | bool EmbedderSnapshotData::CanUseCustomSnapshotPerIsolate() { | 355 | | -#ifdef NODE_V8_SHARED_RO_HEAP | 356 | 355 | return false; | 357 | | -#else | 358 | | - return true; | 359 | | -#endif | 360 | 356 | } | 361 | 357 |
| 362 | 358 | } // namespace node |
Collapse file Copy file name to clipboardExpand all lines: src/api/environment.cc +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -312,17 +312,15 @@ Isolate* NewIsolate(Isolate::CreateParams* params, | 312 | 312 | SnapshotBuilder::InitializeIsolateParams(snapshot_data, params); | 313 | 313 | } | 314 | 314 |
| 315 | | -#ifdef NODE_V8_SHARED_RO_HEAP | 316 | 315 | { | 317 | | - // In shared-readonly-heap mode, V8 requires all snapshots used for | 318 | | - // creating Isolates to be identical. This isn't really memory-safe | | 316 | + // Because it uses a shared readonly-heap, V8 requires all snapshots used | | 317 | + // for creating Isolates to be identical. This isn't really memory-safe | 319 | 318 | // but also otherwise just doesn't work, and the only real alternative | 320 | 319 | // is disabling shared-readonly-heap mode altogether. | 321 | 320 | static Isolate::CreateParams first_params = *params; | 322 | 321 | params->snapshot_blob = first_params.snapshot_blob; | 323 | 322 | params->external_references = first_params.external_references; | 324 | 323 | } | 325 | | -#endif | 326 | 324 |
| 327 | 325 | // Register the isolate on the platform before the isolate gets initialized, | 328 | 326 | // so that the isolate can access the platform during initialization. | |
Collapse file Copy file name to clipboardExpand all lines: src/env.cc +3-9Lines changed: 3 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -828,15 +828,9 @@ Environment::Environment(IsolateData* isolate_data, | 828 | 828 | thread_id_(thread_id.id == static_cast<uint64_t>(-1) | 829 | 829 | ? AllocateEnvironmentThreadId().id | 830 | 830 | : thread_id.id) { | 831 | | - constexpr bool is_shared_ro_heap = | 832 | | -#ifdef NODE_V8_SHARED_RO_HEAP | 833 | | - true; | 834 | | -#else | 835 | | - false; | 836 | | -#endif | 837 | | - if (is_shared_ro_heap && !is_main_thread()) { | 838 | | - // If this is a Worker thread and we are in shared-readonly-heap mode, | 839 | | - // we can always safely use the parent's Isolate's code cache. | | 831 | + if (!is_main_thread()) { | | 832 | + // If this is a Worker thread, we can always safely use the parent's | | 833 | + // Isolate's code cache because of the shared read-only heap. | 840 | 834 | CHECK_NOT_NULL(isolate_data->worker_context()); | 841 | 835 | builtin_loader()->CopySourceAndCodeCacheReferenceFrom( | 842 | 836 | isolate_data->worker_context()->env()->builtin_loader()); | |
Collapse file Copy file name to clipboardExpand all lines: src/node.h +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -543,8 +543,8 @@ class EmbedderSnapshotData { | 543 | 543 | void ToFile(FILE* out) const; | 544 | 544 | std::vector<char> ToBlob() const; | 545 | 545 |
| 546 | | - // Returns whether custom snapshots can be used. Currently, this means | 547 | | - // that V8 was configured without the shared-readonly-heap feature. | | 546 | + // Returns whether custom snapshots can be used. Currently, this always | | 547 | + // returns false since V8 enforces shared readonly-heap. | 548 | 548 | static bool CanUseCustomSnapshotPerIsolate(); | 549 | 549 |
| 550 | 550 | EmbedderSnapshotData(const EmbedderSnapshotData&) = delete; | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/abseil.gyp +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 11 | 11 | 'include_dirs': [ | 12 | 12 | '<(ABSEIL_ROOT)', | 13 | 13 | ], | | 14 | + 'xcode_settings': { | | 15 | + 'OTHER_LDFLAGS': ['-framework CoreFoundation'], | | 16 | + }, | 14 | 17 | }, | 15 | 18 | 'include_dirs': [ | 16 | 19 | '<(ABSEIL_ROOT)', | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/features.gypi +3-7Lines changed: 3 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 134 | 134 | # Enable fast mksnapshot runs. | 135 | 135 | 'v8_enable_fast_mksnapshot%': 0, | 136 | 136 |
| | 137 | + # Enable using multiple threads to build builtins in mksnapshot. | | 138 | + 'v8_enable_concurrent_mksnapshot%': 1, | | 139 | + | 137 | 140 | # Enable the registration of unwinding info for Windows/x64 and ARM64. | 138 | 141 | 'v8_win64_unwinding_info%': 1, | 139 | 142 |
| | 209 | 212 | # Controls the threshold for on-heap/off-heap Typed Arrays. | 210 | 213 | 'v8_typed_array_max_size_in_heap%': 64, | 211 | 214 |
| 212 | | - # Enable sharing read-only space across isolates. | 213 | | - # Sets -DV8_SHARED_RO_HEAP. | 214 | | - 'v8_enable_shared_ro_heap%': 0, | 215 | | - | 216 | 215 | # Enable lazy source positions by default. | 217 | 216 | 'v8_enable_lazy_source_positions%': 1, | 218 | 217 |
| | 437 | 436 | ['v8_use_siphash==1', { | 438 | 437 | 'defines': ['V8_USE_SIPHASH',], | 439 | 438 | }], | 440 | | - ['v8_enable_shared_ro_heap==1', { | 441 | | - 'defines': ['V8_SHARED_RO_HEAP',], | 442 | | - }], | 443 | 439 | ['dcheck_always_on!=0', { | 444 | 440 | 'defines': ['DEBUG',], | 445 | 441 | }, { | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/inspector.gypi -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 119 | 119 | '<(inspector_protocol_path)/crdtp/find_by_first.h', | 120 | 120 | '<(inspector_protocol_path)/crdtp/json.cc', | 121 | 121 | '<(inspector_protocol_path)/crdtp/json.h', | 122 | | - '<(inspector_protocol_path)/crdtp/maybe.h', | 123 | 122 | '<(inspector_protocol_path)/crdtp/parser_handler.h', | 124 | 123 | '<(inspector_protocol_path)/crdtp/protocol_core.cc', | 125 | 124 | '<(inspector_protocol_path)/crdtp/protocol_core.h', | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/v8.gyp +20-1Lines changed: 20 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 451 | 451 | 'mksnapshot_flags': ['--code-comments'], | 452 | 452 | }, | 453 | 453 | }], | | 454 | + ['v8_enable_concurrent_mksnapshot == 1', { | | 455 | + 'variables': { | | 456 | + 'mksnapshot_flags': [ | | 457 | + '--concurrent-builtin-generation', | | 458 | + # Use all the cores for concurrent builtin generation. | | 459 | + '--concurrent-turbofan-max-threads=0', | | 460 | + ], | | 461 | + }, | | 462 | + }], | 454 | 463 | ['v8_enable_snapshot_native_code_counters', { | 455 | 464 | 'variables': { | 456 | 465 | 'mksnapshot_flags': ['--native-code-counters'], | | 481 | 490 | 'v8_compiler_for_mksnapshot', | 482 | 491 | 'v8_initializers', | 483 | 492 | 'v8_libplatform', | | 493 | + 'abseil.gyp:abseil', | 484 | 494 | ] | 485 | 495 | }, { | 486 | 496 | 'dependencies': [ | | 493 | 503 | 'v8_compiler_for_mksnapshot', | 494 | 504 | 'v8_initializers', | 495 | 505 | 'v8_libplatform', | | 506 | + 'abseil.gyp:abseil', | 496 | 507 | ] | 497 | 508 | }], | 498 | 509 | ['OS=="win" and clang==1', { | | 1317 | 1328 | 'dependencies': [ | 1318 | 1329 | 'v8_shared_internal_headers', | 1319 | 1330 | 'v8_libbase', | | 1331 | + 'abseil.gyp:abseil', | 1320 | 1332 | ], | 1321 | 1333 | 'defines!': [ | 1322 | 1334 | '_HAS_EXCEPTIONS=0', | | 1370 | 1382 |
| 1371 | 1383 | 'dependencies': [ | 1372 | 1384 | 'v8_headers', | | 1385 | + 'abseil.gyp:abseil', | 1373 | 1386 | ], | 1374 | 1387 |
| 1375 | 1388 | 'conditions': [ | | 1618 | 1631 | 'toolsets': ['host', 'target'], | 1619 | 1632 | 'dependencies': [ | 1620 | 1633 | 'v8_libbase', | | 1634 | + 'abseil.gyp:abseil', | 1621 | 1635 | ], | 1622 | 1636 | 'sources': [ | 1623 | 1637 | '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?sources = ")', | | 1688 | 1702 | 'BUILDING_V8_SHARED=1', | 1689 | 1703 | ], | 1690 | 1704 | 'dependencies': [ | 1691 | | - "v8_libbase", | | 1705 | + 'v8_libbase', | | 1706 | + 'abseil.gyp:abseil', | 1692 | 1707 | # "build/win:default_exe_manifest", | 1693 | 1708 | ], | 1694 | 1709 | 'sources': [ | | 1751 | 1766 | 'type': 'executable', | 1752 | 1767 | 'dependencies': [ | 1753 | 1768 | 'torque_base', | | 1769 | + 'abseil.gyp:abseil', | 1754 | 1770 | # "build/win:default_exe_manifest", | 1755 | 1771 | ], | 1756 | 1772 | 'conditions': [ | | 1826 | 1842 | 'v8_libbase', | 1827 | 1843 | # "build/win:default_exe_manifest", | 1828 | 1844 | 'v8_maybe_icu', | | 1845 | + 'abseil.gyp:abseil', | 1829 | 1846 | ], | 1830 | 1847 | 'conditions': [ | 1831 | 1848 | ['want_separate_host_toolset', { | | 2074 | 2091 | '<(V8_ROOT)/src/objects/abstract-code-inl.h', | 2075 | 2092 | '<(V8_ROOT)/src/objects/instruction-stream.h', | 2076 | 2093 | '<(V8_ROOT)/src/objects/instruction-stream-inl.h', | | 2094 | + '<(V8_ROOT)/src/objects/casting.h', | | 2095 | + '<(V8_ROOT)/src/objects/casting-inl.h', | 2077 | 2096 | '<(V8_ROOT)/src/objects/code.h', | 2078 | 2097 | '<(V8_ROOT)/src/objects/code-inl.h', | 2079 | 2098 | '<(V8_ROOT)/src/objects/data-handler.h', | |
|