Skip to content

Commit db0ed11

Browse files
committed
tools: update V8 gypfiles for V8 8.3
PR-URL: nodejs#32831 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 308900f commit db0ed11

File tree

4 files changed

+107
-23
lines changed

4 files changed

+107
-23
lines changed

tools/v8_gypfiles/features.gypi

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
# Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
128128
'v8_enable_pointer_compression%': 0,
129-
'v8_enable_31bit_smis_on_64bit_arch%': 1,
129+
'v8_enable_31bit_smis_on_64bit_arch%': 0,
130130

131131
# Sets -dOBJECT_PRINT.
132132
'v8_enable_object_print%': 0,
@@ -147,7 +147,7 @@
147147
'v8_enable_concurrent_marking%': 1,
148148

149149
# Sets -dV8_ARRAY_BUFFER_EXTENSION
150-
'v8_enable_array_buffer_extension%': 0,
150+
'v8_enable_array_buffer_extension%': 1,
151151

152152
# Enables various testing features.
153153
'v8_enable_test_features%': 0,
@@ -196,6 +196,13 @@
196196
# Use switch-based dispatch if this is false.
197197
'v8_enable_regexp_interpreter_threaded_dispatch%': 1,
198198

199+
# Disable all snapshot compression.
200+
'v8_enable_snapshot_compression%': 1,
201+
202+
# Enable control-flow integrity features, such as pointer authentication
203+
# for ARM64.
204+
'v8_control_flow_integrity%': 0,
205+
199206
# Variables from v8.gni
200207

201208
# Enable ECMAScript Internationalization API. Enabling this feature will
@@ -325,6 +332,12 @@
325332
['v8_enable_regexp_interpreter_threaded_dispatch==1', {
326333
'defines': ['V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH',],
327334
}],
335+
['v8_enable_snapshot_compression==1', {
336+
'defines': ['V8_SNAPSHOT_COMPRESSION',],
337+
}],
338+
['v8_control_flow_integrity==1', {
339+
'defines': ['V8_ENABLE_CONTROL_FLOW_INTEGRITY',],
340+
}],
328341
], # conditions
329342
'defines': [
330343
'V8_EMBEDDED_BUILTINS',

tools/v8_gypfiles/inspector.gypi

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,9 @@
88
'inspector_protocol_files': [
99
'<(inspector_protocol_path)/lib/base_string_adapter_cc.template',
1010
'<(inspector_protocol_path)/lib/base_string_adapter_h.template',
11-
'<(inspector_protocol_path)/lib/DispatcherBase_cpp.template',
12-
'<(inspector_protocol_path)/lib/DispatcherBase_h.template',
13-
'<(inspector_protocol_path)/lib/ErrorSupport_cpp.template',
14-
'<(inspector_protocol_path)/lib/ErrorSupport_h.template',
1511
'<(inspector_protocol_path)/lib/Forward_h.template',
16-
'<(inspector_protocol_path)/lib/FrontendChannel_h.template',
1712
'<(inspector_protocol_path)/lib/Object_cpp.template',
1813
'<(inspector_protocol_path)/lib/Object_h.template',
19-
'<(inspector_protocol_path)/lib/Parser_cpp.template',
20-
'<(inspector_protocol_path)/lib/Parser_h.template',
2114
'<(inspector_protocol_path)/lib/Protocol_cpp.template',
2215
'<(inspector_protocol_path)/lib/ValueConversions_h.template',
2316
'<(inspector_protocol_path)/lib/Values_cpp.template',
@@ -111,14 +104,20 @@
111104
# Flat merge `third_party/inspector_protocol:crdtp`
112105
'<(inspector_protocol_path)/crdtp/cbor.cc',
113106
'<(inspector_protocol_path)/crdtp/cbor.h',
107+
'<(inspector_protocol_path)/crdtp/dispatch.cc',
108+
'<(inspector_protocol_path)/crdtp/dispatch.h',
109+
'<(inspector_protocol_path)/crdtp/error_support.cc',
110+
'<(inspector_protocol_path)/crdtp/error_support.h',
114111
'<(inspector_protocol_path)/crdtp/export.h',
112+
'<(inspector_protocol_path)/crdtp/find_by_first.h',
115113
'<(inspector_protocol_path)/crdtp/glue.h',
116114
'<(inspector_protocol_path)/crdtp/json.cc',
117115
'<(inspector_protocol_path)/crdtp/json.h',
118116
'<(inspector_protocol_path)/crdtp/parser_handler.h',
119117
'<(inspector_protocol_path)/crdtp/serializable.cc',
120118
'<(inspector_protocol_path)/crdtp/serializable.h',
121119
'<(inspector_protocol_path)/crdtp/serializer_traits.h',
120+
'<(inspector_protocol_path)/crdtp/span.cc',
122121
'<(inspector_protocol_path)/crdtp/span.h',
123122
'<(inspector_protocol_path)/crdtp/status.cc',
124123
'<(inspector_protocol_path)/crdtp/status.h',

tools/v8_gypfiles/toolchain.gypi

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,17 @@
298298
'defines': [
299299
'V8_TARGET_ARCH_ARM64',
300300
],
301+
'conditions': [
302+
['v8_control_flow_integrity==1', {
303+
'cflags': [ '-mbranch-protection=standard' ],
304+
}],
305+
],
301306
}],
302307
['v8_target_arch=="s390x"', {
303308
'defines': [
304309
'V8_TARGET_ARCH_S390',
305310
],
311+
'cflags': [ '-ffp-contract=off' ],
306312
'conditions': [
307313
['v8_target_arch=="s390x"', {
308314
'defines': [
@@ -319,10 +325,12 @@
319325
],
320326
}], # s390x
321327
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
322-
'defines': [
323-
'V8_TARGET_ARCH_PPC',
324-
],
325328
'conditions': [
329+
['v8_target_arch=="ppc"', {
330+
'defines': [
331+
'V8_TARGET_ARCH_PPC',
332+
],
333+
}],
326334
['v8_target_arch=="ppc64"', {
327335
'defines': [
328336
'V8_TARGET_ARCH_PPC64',

tools/v8_gypfiles/v8.gyp

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,14 @@
221221
'<(torque_output_root)/torque-generated/bit-fields-tq.h',
222222
'<(torque_output_root)/torque-generated/builtin-definitions-tq.h',
223223
'<(torque_output_root)/torque-generated/interface-descriptors-tq.inc',
224+
'<(torque_output_root)/torque-generated/factory-tq.cc',
225+
'<(torque_output_root)/torque-generated/factory-tq.inc',
224226
'<(torque_output_root)/torque-generated/field-offsets-tq.h',
225227
'<(torque_output_root)/torque-generated/class-verifiers-tq.cc',
226228
'<(torque_output_root)/torque-generated/class-verifiers-tq.h',
227229
'<(torque_output_root)/torque-generated/enum-verifiers-tq.cc',
228230
'<(torque_output_root)/torque-generated/objects-printer-tq.cc',
231+
'<(torque_output_root)/torque-generated/objects-body-descriptors-tq-inl.h',
229232
'<(torque_output_root)/torque-generated/class-definitions-tq.cc',
230233
'<(torque_output_root)/torque-generated/class-definitions-tq-inl.h',
231234
'<(torque_output_root)/torque-generated/class-definitions-tq.h',
@@ -309,6 +312,7 @@
309312
'<(torque_output_root)/torque-generated/class-definitions-tq.cc',
310313
'<(torque_output_root)/torque-generated/class-verifiers-tq.cc',
311314
'<(torque_output_root)/torque-generated/class-verifiers-tq.h',
315+
'<(torque_output_root)/torque-generated/factory-tq.cc',
312316
'<(torque_output_root)/torque-generated/objects-printer-tq.cc',
313317
],
314318
'include_dirs': [
@@ -425,7 +429,12 @@
425429
'<(V8_ROOT)/src/builtins/mips64/builtins-mips64.cc',
426430
],
427431
}],
428-
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
432+
['v8_target_arch=="ppc"', {
433+
'sources': [
434+
'<(V8_ROOT)/src/builtins/ppc/builtins-ppc.cc',
435+
],
436+
}],
437+
['v8_target_arch=="ppc64"', {
429438
'sources': [
430439
'<(V8_ROOT)/src/builtins/ppc/builtins-ppc.cc',
431440
],
@@ -590,6 +599,7 @@
590599
],
591600
'direct_dependent_settings': {
592601
'sources': [
602+
'<(V8_ROOT)/include/v8-fast-api-calls.h',
593603
'<(V8_ROOT)/include/v8-internal.h',
594604
'<(V8_ROOT)/include/v8.h',
595605
'<(V8_ROOT)/include/v8config.h',
@@ -733,6 +743,15 @@
733743
['want_separate_host_toolset', {
734744
'toolsets': ['host', 'target'],
735745
}],
746+
['v8_control_flow_integrity==1', {
747+
'sources': [
748+
'<(V8_ROOT)/src/execution/arm64/pointer-authentication-arm64.h',
749+
],
750+
}, {
751+
'sources': [
752+
'<(V8_ROOT)/src/execution/pointer-authentication-dummy.h',
753+
],
754+
}],
736755
['v8_target_arch=="ia32"', {
737756
'sources': [ ### gcmole(arch:ia32) ###
738757
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x86.*?sources \+= ")',
@@ -759,32 +778,37 @@
759778
}],
760779
['v8_target_arch=="arm"', {
761780
'sources': [ ### gcmole(arch:arm) ###
762-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm.*?sources \+= ")',
781+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm\\".*?sources \+= ")',
763782
],
764783
}],
765784
['v8_target_arch=="arm64"', {
766785
'sources': [ ### gcmole(arch:arm64) ###
767-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64.*?sources \+= ")',
786+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64\\".*?sources \+= ")',
768787
],
769788
}],
770789
['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
771790
'sources': [ ### gcmole(arch:mipsel) ###
772-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips.*?sources \+= ")',
791+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips\\".*?sources \+= ")',
773792
],
774793
}],
775794
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
776795
'sources': [ ### gcmole(arch:mips64el) ###
777-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64.*?sources \+= ")',
796+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64\\".*?sources \+= ")',
778797
],
779798
}],
780-
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
799+
['v8_target_arch=="ppc"', {
781800
'sources': [ ### gcmole(arch:ppc) ###
782-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc.*?sources \+= ")',
801+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc\\".*?sources \+= ")',
802+
],
803+
}],
804+
['v8_target_arch=="ppc64"', {
805+
'sources': [ ### gcmole(arch:ppc64) ###
806+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc64\\".*?sources \+= ")',
783807
],
784808
}],
785809
['v8_target_arch=="s390x"', {
786810
'sources': [ ### gcmole(arch:s390) ###
787-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390.*?sources \+= ")',
811+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390\\".*?sources \+= ")',
788812
],
789813
}],
790814
['OS=="win"', {
@@ -1607,11 +1631,51 @@
16071631
}],
16081632
],
16091633
'direct_dependent_settings': {
1610-
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
1634+
'include_dirs': [
1635+
'<(V8_ROOT)/third_party/zlib',
1636+
'<(V8_ROOT)/third_party/zlib/google',
1637+
],
16111638
},
16121639
'defines': [ 'ZLIB_IMPLEMENTATION' ],
1613-
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
1614-
'sources': [ '<(V8_ROOT)/third_party/zlib/adler32.c' ],
1640+
'include_dirs': [
1641+
'<(V8_ROOT)/third_party/zlib',
1642+
'<(V8_ROOT)/third_party/zlib/google',
1643+
],
1644+
'sources': [
1645+
'<(V8_ROOT)/third_party/zlib/adler32.c',
1646+
'<(V8_ROOT)/third_party/zlib/chromeconf.h',
1647+
'<(V8_ROOT)/third_party/zlib/compress.c',
1648+
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
1649+
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
1650+
'<(V8_ROOT)/third_party/zlib/cpu_features.c',
1651+
'<(V8_ROOT)/third_party/zlib/cpu_features.h',
1652+
'<(V8_ROOT)/third_party/zlib/crc32.c',
1653+
'<(V8_ROOT)/third_party/zlib/crc32.h',
1654+
'<(V8_ROOT)/third_party/zlib/deflate.c',
1655+
'<(V8_ROOT)/third_party/zlib/deflate.h',
1656+
'<(V8_ROOT)/third_party/zlib/gzclose.c',
1657+
'<(V8_ROOT)/third_party/zlib/gzguts.h',
1658+
'<(V8_ROOT)/third_party/zlib/gzlib.c',
1659+
'<(V8_ROOT)/third_party/zlib/gzread.c',
1660+
'<(V8_ROOT)/third_party/zlib/gzwrite.c',
1661+
'<(V8_ROOT)/third_party/zlib/infback.c',
1662+
'<(V8_ROOT)/third_party/zlib/inffast.c',
1663+
'<(V8_ROOT)/third_party/zlib/inffast.h',
1664+
'<(V8_ROOT)/third_party/zlib/inffixed.h',
1665+
'<(V8_ROOT)/third_party/zlib/inflate.c',
1666+
'<(V8_ROOT)/third_party/zlib/inflate.h',
1667+
'<(V8_ROOT)/third_party/zlib/inftrees.c',
1668+
'<(V8_ROOT)/third_party/zlib/inftrees.h',
1669+
'<(V8_ROOT)/third_party/zlib/trees.c',
1670+
'<(V8_ROOT)/third_party/zlib/trees.h',
1671+
'<(V8_ROOT)/third_party/zlib/uncompr.c',
1672+
'<(V8_ROOT)/third_party/zlib/zconf.h',
1673+
'<(V8_ROOT)/third_party/zlib/zlib.h',
1674+
'<(V8_ROOT)/third_party/zlib/zutil.c',
1675+
'<(V8_ROOT)/third_party/zlib/zutil.h',
1676+
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.cc',
1677+
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.h',
1678+
],
16151679
}, # v8_zlib
16161680
],
16171681
}

0 commit comments

Comments
 (0)