Skip to content

Commit c8e9848

Browse files
targosnodejs-github-bot
authored andcommitted
tools: update V8 gypfiles for 13.3
Refs: v8/v8@1c9f59c Refs: v8/v8@b1c5eba Refs: v8/v8@b3054f7 Refs: v8/v8@f81e87e Refs: v8/v8@dc0e305 Refs: v8/v8@41d42ce
1 parent 79d47b9 commit c8e9848

File tree

9 files changed

+33
-38
lines changed

9 files changed

+33
-38
lines changed

configure.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,6 @@
612612
default=None,
613613
help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)')
614614

615-
parser.add_argument('--disable-shared-readonly-heap',
616-
action='store_true',
617-
dest='disable_shared_ro_heap',
618-
default=None,
619-
help='Disable the shared read-only heap feature in V8')
620-
621615
parser.add_argument('--v8-options',
622616
action='store',
623617
dest='v8_options',
@@ -1661,7 +1655,6 @@ def configure_v8(o, configs):
16611655
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
16621656
o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
16631657
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
1664-
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.disable_shared_ro_heap else 1
16651658
o['variables']['v8_enable_extensible_ro_snapshot'] = 0
16661659
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
16671660
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)

node.gypi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
'NODE_USE_V8_PLATFORM=0',
9797
],
9898
}],
99-
[ 'v8_enable_shared_ro_heap==1', {
100-
'defines': ['NODE_V8_SHARED_RO_HEAP',],
101-
}],
10299
[ 'node_tag!=""', {
103100
'defines': [ 'NODE_TAG="<(node_tag)"' ],
104101
}],

src/api/embed_helpers.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,7 @@ EmbedderSnapshotData::EmbedderSnapshotData(const SnapshotData* impl,
347347
: impl_(impl), owns_impl_(owns_impl) {}
348348

349349
bool EmbedderSnapshotData::CanUseCustomSnapshotPerIsolate() {
350-
#ifdef NODE_V8_SHARED_RO_HEAP
351350
return false;
352-
#else
353-
return true;
354-
#endif
355351
}
356352

357353
} // namespace node

src/api/environment.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,17 +308,15 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
308308
SnapshotBuilder::InitializeIsolateParams(snapshot_data, params);
309309
}
310310

311-
#ifdef NODE_V8_SHARED_RO_HEAP
312311
{
313-
// In shared-readonly-heap mode, V8 requires all snapshots used for
314-
// creating Isolates to be identical. This isn't really memory-safe
312+
// Because it uses a shared readonly-heap, V8 requires all snapshots used
313+
// for creating Isolates to be identical. This isn't really memory-safe
315314
// but also otherwise just doesn't work, and the only real alternative
316315
// is disabling shared-readonly-heap mode altogether.
317316
static Isolate::CreateParams first_params = *params;
318317
params->snapshot_blob = first_params.snapshot_blob;
319318
params->external_references = first_params.external_references;
320319
}
321-
#endif
322320

323321
// Register the isolate on the platform before the isolate gets initialized,
324322
// so that the isolate can access the platform during initialization.

src/env.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -820,15 +820,9 @@ Environment::Environment(IsolateData* isolate_data,
820820
thread_id_(thread_id.id == static_cast<uint64_t>(-1)
821821
? AllocateEnvironmentThreadId().id
822822
: thread_id.id) {
823-
constexpr bool is_shared_ro_heap =
824-
#ifdef NODE_V8_SHARED_RO_HEAP
825-
true;
826-
#else
827-
false;
828-
#endif
829-
if (is_shared_ro_heap && !is_main_thread()) {
830-
// If this is a Worker thread and we are in shared-readonly-heap mode,
831-
// we can always safely use the parent's Isolate's code cache.
823+
if (!is_main_thread()) {
824+
// If this is a Worker thread, we can always safely use the parent's
825+
// Isolate's code cache because of the shared read-only heap.
832826
CHECK_NOT_NULL(isolate_data->worker_context());
833827
builtin_loader()->CopySourceAndCodeCacheReferenceFrom(
834828
isolate_data->worker_context()->env()->builtin_loader());

src/node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ class EmbedderSnapshotData {
541541
void ToFile(FILE* out) const;
542542
std::vector<char> ToBlob() const;
543543

544-
// Returns whether custom snapshots can be used. Currently, this means
545-
// that V8 was configured without the shared-readonly-heap feature.
544+
// Returns whether custom snapshots can be used. Currently, this always
545+
// returns false since V8 enforces shared readonly-heap.
546546
static bool CanUseCustomSnapshotPerIsolate();
547547

548548
EmbedderSnapshotData(const EmbedderSnapshotData&) = delete;

tools/v8_gypfiles/features.gypi

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@
134134
# Enable fast mksnapshot runs.
135135
'v8_enable_fast_mksnapshot%': 0,
136136

137+
# Enable using multiple threads to build builtins in mksnapshot.
138+
'v8_enable_concurrent_mksnapshot%': 1,
139+
137140
# Enable the registration of unwinding info for Windows/x64 and ARM64.
138141
'v8_win64_unwinding_info%': 1,
139142

@@ -209,10 +212,6 @@
209212
# Controls the threshold for on-heap/off-heap Typed Arrays.
210213
'v8_typed_array_max_size_in_heap%': 64,
211214

212-
# Enable sharing read-only space across isolates.
213-
# Sets -DV8_SHARED_RO_HEAP.
214-
'v8_enable_shared_ro_heap%': 0,
215-
216215
# Enable lazy source positions by default.
217216
'v8_enable_lazy_source_positions%': 1,
218217

@@ -437,9 +436,6 @@
437436
['v8_use_siphash==1', {
438437
'defines': ['V8_USE_SIPHASH',],
439438
}],
440-
['v8_enable_shared_ro_heap==1', {
441-
'defines': ['V8_SHARED_RO_HEAP',],
442-
}],
443439
['dcheck_always_on!=0', {
444440
'defines': ['DEBUG',],
445441
}, {

tools/v8_gypfiles/inspector.gypi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
'<(inspector_protocol_path)/crdtp/find_by_first.h',
120120
'<(inspector_protocol_path)/crdtp/json.cc',
121121
'<(inspector_protocol_path)/crdtp/json.h',
122-
'<(inspector_protocol_path)/crdtp/maybe.h',
123122
'<(inspector_protocol_path)/crdtp/parser_handler.h',
124123
'<(inspector_protocol_path)/crdtp/protocol_core.cc',
125124
'<(inspector_protocol_path)/crdtp/protocol_core.h',

tools/v8_gypfiles/v8.gyp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,15 @@
451451
'mksnapshot_flags': ['--code-comments'],
452452
},
453453
}],
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+
}],
454463
['v8_enable_snapshot_native_code_counters', {
455464
'variables': {
456465
'mksnapshot_flags': ['--native-code-counters'],
@@ -481,6 +490,7 @@
481490
'v8_compiler_for_mksnapshot',
482491
'v8_initializers',
483492
'v8_libplatform',
493+
'v8_abseil',
484494
]
485495
}, {
486496
'dependencies': [
@@ -493,6 +503,7 @@
493503
'v8_compiler_for_mksnapshot',
494504
'v8_initializers',
495505
'v8_libplatform',
506+
'v8_abseil',
496507
]
497508
}],
498509
['OS=="win" and clang==1', {
@@ -1259,6 +1270,7 @@
12591270
'dependencies': [
12601271
'v8_shared_internal_headers',
12611272
'v8_libbase',
1273+
'v8_abseil',
12621274
],
12631275
'defines!': [
12641276
'_HAS_EXCEPTIONS=0',
@@ -1312,6 +1324,7 @@
13121324

13131325
'dependencies': [
13141326
'v8_headers',
1327+
'v8_abseil',
13151328
],
13161329

13171330
'conditions': [
@@ -1560,6 +1573,7 @@
15601573
'toolsets': ['host', 'target'],
15611574
'dependencies': [
15621575
'v8_libbase',
1576+
'v8_abseil',
15631577
],
15641578
'sources': [
15651579
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?sources = ")',
@@ -1630,7 +1644,8 @@
16301644
'BUILDING_V8_SHARED=1',
16311645
],
16321646
'dependencies': [
1633-
"v8_libbase",
1647+
'v8_libbase',
1648+
'v8_abseil',
16341649
# "build/win:default_exe_manifest",
16351650
],
16361651
'sources': [
@@ -1693,6 +1708,7 @@
16931708
'type': 'executable',
16941709
'dependencies': [
16951710
'torque_base',
1711+
'v8_abseil',
16961712
# "build/win:default_exe_manifest",
16971713
],
16981714
'conditions': [
@@ -1768,6 +1784,7 @@
17681784
'v8_libbase',
17691785
# "build/win:default_exe_manifest",
17701786
'v8_maybe_icu',
1787+
'v8_abseil',
17711788
],
17721789
'conditions': [
17731790
['want_separate_host_toolset', {
@@ -2016,6 +2033,8 @@
20162033
'<(V8_ROOT)/src/objects/abstract-code-inl.h',
20172034
'<(V8_ROOT)/src/objects/instruction-stream.h',
20182035
'<(V8_ROOT)/src/objects/instruction-stream-inl.h',
2036+
'<(V8_ROOT)/src/objects/casting.h',
2037+
'<(V8_ROOT)/src/objects/casting-inl.h',
20192038
'<(V8_ROOT)/src/objects/code.h',
20202039
'<(V8_ROOT)/src/objects/code-inl.h',
20212040
'<(V8_ROOT)/src/objects/data-handler.h',
@@ -2181,6 +2200,9 @@
21812200
'include_dirs': [
21822201
'<(ABSEIL_ROOT)',
21832202
],
2203+
'xcode_settings': {
2204+
'OTHER_LDFLAGS': ['-framework CoreFoundation'],
2205+
},
21842206
},
21852207
'include_dirs': [
21862208
'<(ABSEIL_ROOT)',

0 commit comments

Comments
 (0)