Skip to content

Commit dda658c

Browse files
committed
build,tools: update V8 gypfiles for V8 7.9
V8 can can no longer be built without snapshot. PR-URL: nodejs#30020 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 10af006 commit dda658c

File tree

4 files changed

+84
-62
lines changed

4 files changed

+84
-62
lines changed

common.gypi

+18-38
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343

4444
##### V8 defaults for Node.js #####
4545

46-
# Old time default, now explicitly stated.
47-
'v8_use_snapshot': 1,
48-
4946
# Turn on SipHash for hash seed generation, addresses HashWick
5047
'v8_use_siphash': 'true',
5148

@@ -76,52 +73,27 @@
7673
# TODO(refack): make v8-perfetto happen
7774
'v8_use_perfetto': 0,
7875

76+
'v8_enable_pointer_compression': 0,
77+
'v8_enable_31bit_smis_on_64bit_arch': 0,
78+
7979
##### end V8 defaults #####
8080

8181
'conditions': [
8282
['OS == "win"', {
8383
'os_posix': 0,
8484
'v8_postmortem_support%': 0,
85+
'obj_dir': '<(PRODUCT_DIR)/obj',
86+
'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a',
8587
}, {
8688
'os_posix': 1,
8789
'v8_postmortem_support%': 1,
8890
}],
89-
['v8_use_snapshot==1', {
90-
'conditions': [
91-
['GENERATOR == "ninja"', {
92-
'obj_dir': '<(PRODUCT_DIR)/obj',
93-
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a',
94-
}, {
95-
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
96-
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
97-
}],
98-
['OS == "win"', {
99-
'obj_dir': '<(PRODUCT_DIR)/obj',
100-
'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a',
101-
}],
102-
['OS == "mac"', {
103-
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
104-
'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
105-
}],
106-
],
91+
['GENERATOR == "ninja"', {
92+
'obj_dir': '<(PRODUCT_DIR)/obj',
93+
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a',
10794
}, {
108-
'conditions': [
109-
['GENERATOR == "ninja"', {
110-
'obj_dir': '<(PRODUCT_DIR)/obj',
111-
'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_nosnapshot.a',
112-
}, {
113-
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
114-
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_nosnapshot.a',
115-
}],
116-
['OS == "win"', {
117-
'obj_dir': '<(PRODUCT_DIR)/obj',
118-
'v8_base': '<(PRODUCT_DIR)/lib/libv8_nosnapshot.a',
119-
}],
120-
['OS == "mac"', {
121-
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
122-
'v8_base': '<(PRODUCT_DIR)/libv8_nosnapshot.a',
123-
}],
124-
],
95+
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
96+
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
12597
}],
12698
['openssl_fips != ""', {
12799
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
@@ -130,6 +102,8 @@
130102
}],
131103
['OS=="mac"', {
132104
'clang%': 1,
105+
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
106+
'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
133107
}],
134108
],
135109
},
@@ -334,6 +308,12 @@
334308
}],
335309
],
336310
}],
311+
['v8_enable_pointer_compression == 1', {
312+
'defines': ['V8_COMPRESS_POINTERS'],
313+
}],
314+
['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', {
315+
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
316+
}],
337317
['OS == "win"', {
338318
'defines': [
339319
'WIN32',

node.gyp

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
'variables': {
33
'v8_use_siphash%': 0,
4-
'v8_use_snapshot%': 1,
54
'v8_trace_maps%': 0,
65
'node_use_dtrace%': 'false',
76
'node_use_etw%': 'false',

tools/v8_gypfiles/features.gypi

+2-11
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@
198198

199199
# Variables from v8.gni
200200

201-
# Enable the snapshot feature, for fast context creation.
202-
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
203-
'v8_use_snapshot%': 1,
204-
205201
# Enable ECMAScript Internationalization API. Enabling this feature will
206202
# add a dependency on the ICU library.
207203
'v8_enable_i18n_support%': 1,
@@ -287,13 +283,8 @@
287283
# ['v8_enable_handle_zapping==1', {
288284
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
289285
# }],
290-
['v8_use_snapshot==1', {
291-
'defines': ['V8_USE_SNAPSHOT',],
292-
'conditions': [
293-
['v8_enable_snapshot_native_code_counters==1', {
294-
'defines': ['V8_SNAPSHOT_NATIVE_CODE_COUNTERS',],
295-
}],
296-
],
286+
['v8_enable_snapshot_native_code_counters==1', {
287+
'defines': ['V8_SNAPSHOT_NATIVE_CODE_COUNTERS',],
297288
}],
298289
['v8_enable_single_generation==1', {
299290
'defines': ['V8_ENABLE_SINGLE_GENERATION',],

tools/v8_gypfiles/v8.gyp

+64-12
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@
5959
"<(V8_ROOT)/src/builtins/proxy-set-prototype-of.tq",
6060
"<(V8_ROOT)/src/builtins/proxy.tq",
6161
"<(V8_ROOT)/src/builtins/reflect.tq",
62+
"<(V8_ROOT)/src/builtins/regexp-exec.tq",
63+
"<(V8_ROOT)/src/builtins/regexp-match-all.tq",
6264
"<(V8_ROOT)/src/builtins/regexp-match.tq",
6365
"<(V8_ROOT)/src/builtins/regexp-replace.tq",
66+
"<(V8_ROOT)/src/builtins/regexp-search.tq",
6467
"<(V8_ROOT)/src/builtins/regexp-source.tq",
68+
"<(V8_ROOT)/src/builtins/regexp-split.tq",
6569
"<(V8_ROOT)/src/builtins/regexp-test.tq",
6670
"<(V8_ROOT)/src/builtins/regexp.tq",
6771
"<(V8_ROOT)/src/builtins/string.tq",
@@ -131,6 +135,7 @@
131135
],
132136
'outputs': [
133137
'<(torque_output_root)/torque-generated/builtin-definitions-tq.h',
138+
'<(torque_output_root)/torque-generated/interface-descriptors-tq.inc',
134139
'<(torque_output_root)/torque-generated/field-offsets-tq.h',
135140
'<(torque_output_root)/torque-generated/class-verifiers-tq.cc',
136141
'<(torque_output_root)/torque-generated/class-verifiers-tq.h',
@@ -271,16 +276,7 @@
271276
'type': 'none',
272277
'toolsets': ['target'],
273278
'hard_dependency': 1,
274-
'conditions': [
275-
# The dependency on v8_base should come from a transitive
276-
# dependency however the Android toolchain requires libv8_base.a
277-
# to appear before libv8_snapshot.a so it's listed explicitly.
278-
['v8_use_snapshot==1', {
279-
'dependencies': ['v8_base', 'v8_snapshot'],
280-
}, {
281-
'dependencies': ['v8_base', 'v8_init', 'v8_nosnapshot'],
282-
}],
283-
]
279+
'dependencies': ['v8_base', 'v8_snapshot'],
284280
}, # v8_maybe_snapshot
285281
{
286282
'target_name': 'v8_init',
@@ -1488,7 +1484,6 @@
14881484
'v8_enable_i18n_support=<(v8_enable_i18n_support)',
14891485
'v8_enable_verify_predictable=<(v8_enable_verify_predictable)',
14901486
'v8_target_cpu=<(v8_target_arch)',
1491-
'v8_use_snapshot=<(v8_use_snapshot)',
14921487
'v8_use_siphash=<(v8_use_siphash)',
14931488
'v8_enable_embedded_builtins=<(v8_enable_embedded_builtins)',
14941489
'v8_enable_verify_csa=<(v8_enable_verify_csa)',
@@ -1526,9 +1521,66 @@
15261521
'toolsets': ['host', 'target'],
15271522
}],
15281523
],
1524+
'dependencies': ['run_torque'],
15291525
'variables': {
15301526
'heapobject_files': [
1531-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"postmortem-metadata.*?sources = ")',
1527+
'<(V8_ROOT)/src/objects/objects.h',
1528+
'<(V8_ROOT)/src/objects/objects-inl.h',
1529+
'<(V8_ROOT)/src/objects/allocation-site-inl.h',
1530+
'<(V8_ROOT)/src/objects/allocation-site.h',
1531+
'<(V8_ROOT)/src/objects/cell-inl.h',
1532+
'<(V8_ROOT)/src/objects/cell.h',
1533+
'<(V8_ROOT)/src/objects/code-inl.h',
1534+
'<(V8_ROOT)/src/objects/code.h',
1535+
'<(V8_ROOT)/src/objects/data-handler.h',
1536+
'<(V8_ROOT)/src/objects/data-handler-inl.h',
1537+
'<(V8_ROOT)/src/objects/descriptor-array.h',
1538+
'<(V8_ROOT)/src/objects/descriptor-array-inl.h',
1539+
'<(V8_ROOT)/src/objects/feedback-cell.h',
1540+
'<(V8_ROOT)/src/objects/feedback-cell-inl.h',
1541+
'<(V8_ROOT)/src/objects/fixed-array-inl.h',
1542+
'<(V8_ROOT)/src/objects/fixed-array.h',
1543+
'<(V8_ROOT)/src/objects/heap-number-inl.h',
1544+
'<(V8_ROOT)/src/objects/heap-number.h',
1545+
'<(V8_ROOT)/src/objects/heap-object-inl.h',
1546+
'<(V8_ROOT)/src/objects/heap-object.h',
1547+
'<(V8_ROOT)/src/objects/instance-type.h',
1548+
'<(V8_ROOT)/src/objects/js-array-inl.h',
1549+
'<(V8_ROOT)/src/objects/js-array.h',
1550+
'<(V8_ROOT)/src/objects/js-array-buffer-inl.h',
1551+
'<(V8_ROOT)/src/objects/js-array-buffer.h',
1552+
'<(V8_ROOT)/src/objects/js-objects-inl.h',
1553+
'<(V8_ROOT)/src/objects/js-objects.h',
1554+
'<(V8_ROOT)/src/objects/js-promise-inl.h',
1555+
'<(V8_ROOT)/src/objects/js-promise.h',
1556+
'<(V8_ROOT)/src/objects/js-regexp-inl.h',
1557+
'<(V8_ROOT)/src/objects/js-regexp.cc',
1558+
'<(V8_ROOT)/src/objects/js-regexp.h',
1559+
'<(V8_ROOT)/src/objects/js-regexp-string-iterator-inl.h',
1560+
'<(V8_ROOT)/src/objects/js-regexp-string-iterator.h',
1561+
'<(V8_ROOT)/src/objects/map.h',
1562+
'<(V8_ROOT)/src/objects/map.cc',
1563+
'<(V8_ROOT)/src/objects/map-inl.h',
1564+
'<(V8_ROOT)/src/objects/js-objects.cc',
1565+
'<(V8_ROOT)/src/objects/name.h',
1566+
'<(V8_ROOT)/src/objects/name-inl.h',
1567+
'<(V8_ROOT)/src/objects/oddball-inl.h',
1568+
'<(V8_ROOT)/src/objects/oddball.h',
1569+
'<(V8_ROOT)/src/objects/primitive-heap-object.h',
1570+
'<(V8_ROOT)/src/objects/primitive-heap-object-inl.h',
1571+
'<(V8_ROOT)/src/objects/scope-info.h',
1572+
'<(V8_ROOT)/src/objects/script.h',
1573+
'<(V8_ROOT)/src/objects/script-inl.h',
1574+
'<(V8_ROOT)/src/objects/shared-function-info.h',
1575+
'<(V8_ROOT)/src/objects/shared-function-info-inl.h',
1576+
'<(V8_ROOT)/src/objects/string.cc',
1577+
'<(V8_ROOT)/src/objects/string.h',
1578+
'<(V8_ROOT)/src/objects/string-comparator.cc',
1579+
'<(V8_ROOT)/src/objects/string-comparator.h',
1580+
'<(V8_ROOT)/src/objects/string-inl.h',
1581+
'<(V8_ROOT)/src/objects/struct.h',
1582+
'<(V8_ROOT)/src/objects/struct-inl.h',
1583+
'<(torque_output_root)/torque-generated/instance-types-tq.h',
15321584
],
15331585
},
15341586
'actions': [

0 commit comments

Comments
 (0)