Skip to content

Commit 2c59f9b

Browse files
committed
tools: update V8 gypfiles for V8 8.3
Backport-PR-URL: #33376 PR-URL: #32831 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 4ccaa53 commit 2c59f9b

File tree

4 files changed

+107
-23
lines changed

4 files changed

+107
-23
lines changed

tools/v8_gypfiles/features.gypi

+15-2
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

+6-7
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

+11-3
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

+75-11
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
],
@@ -595,6 +604,7 @@
595604
],
596605
'direct_dependent_settings': {
597606
'sources': [
607+
'<(V8_ROOT)/include/v8-fast-api-calls.h',
598608
'<(V8_ROOT)/include/v8-internal.h',
599609
'<(V8_ROOT)/include/v8.h',
600610
'<(V8_ROOT)/include/v8config.h',
@@ -738,6 +748,15 @@
738748
['want_separate_host_toolset', {
739749
'toolsets': ['host', 'target'],
740750
}],
751+
['v8_control_flow_integrity==1', {
752+
'sources': [
753+
'<(V8_ROOT)/src/execution/arm64/pointer-authentication-arm64.h',
754+
],
755+
}, {
756+
'sources': [
757+
'<(V8_ROOT)/src/execution/pointer-authentication-dummy.h',
758+
],
759+
}],
741760
['v8_target_arch=="ia32"', {
742761
'sources': [ ### gcmole(arch:ia32) ###
743762
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x86.*?sources \+= ")',
@@ -764,12 +783,12 @@
764783
}],
765784
['v8_target_arch=="arm"', {
766785
'sources': [ ### gcmole(arch:arm) ###
767-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm.*?sources \+= ")',
786+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm\\".*?sources \+= ")',
768787
],
769788
}],
770789
['v8_target_arch=="arm64"', {
771790
'sources': [ ### gcmole(arch:arm64) ###
772-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64.*?sources \+= ")',
791+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64\\".*?sources \+= ")',
773792
],
774793
'conditions': [
775794
['OS=="win"', {
@@ -790,22 +809,27 @@
790809
}],
791810
['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
792811
'sources': [ ### gcmole(arch:mipsel) ###
793-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips.*?sources \+= ")',
812+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips\\".*?sources \+= ")',
794813
],
795814
}],
796815
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
797816
'sources': [ ### gcmole(arch:mips64el) ###
798-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64.*?sources \+= ")',
817+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64\\".*?sources \+= ")',
799818
],
800819
}],
801-
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
820+
['v8_target_arch=="ppc"', {
802821
'sources': [ ### gcmole(arch:ppc) ###
803-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc.*?sources \+= ")',
822+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc\\".*?sources \+= ")',
823+
],
824+
}],
825+
['v8_target_arch=="ppc64"', {
826+
'sources': [ ### gcmole(arch:ppc64) ###
827+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc64\\".*?sources \+= ")',
804828
],
805829
}],
806830
['v8_target_arch=="s390x"', {
807831
'sources': [ ### gcmole(arch:s390) ###
808-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390.*?sources \+= ")',
832+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390\\".*?sources \+= ")',
809833
],
810834
}],
811835
['OS=="win"', {
@@ -1628,11 +1652,51 @@
16281652
}],
16291653
],
16301654
'direct_dependent_settings': {
1631-
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
1655+
'include_dirs': [
1656+
'<(V8_ROOT)/third_party/zlib',
1657+
'<(V8_ROOT)/third_party/zlib/google',
1658+
],
16321659
},
16331660
'defines': [ 'ZLIB_IMPLEMENTATION' ],
1634-
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
1635-
'sources': [ '<(V8_ROOT)/third_party/zlib/adler32.c' ],
1661+
'include_dirs': [
1662+
'<(V8_ROOT)/third_party/zlib',
1663+
'<(V8_ROOT)/third_party/zlib/google',
1664+
],
1665+
'sources': [
1666+
'<(V8_ROOT)/third_party/zlib/adler32.c',
1667+
'<(V8_ROOT)/third_party/zlib/chromeconf.h',
1668+
'<(V8_ROOT)/third_party/zlib/compress.c',
1669+
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
1670+
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
1671+
'<(V8_ROOT)/third_party/zlib/cpu_features.c',
1672+
'<(V8_ROOT)/third_party/zlib/cpu_features.h',
1673+
'<(V8_ROOT)/third_party/zlib/crc32.c',
1674+
'<(V8_ROOT)/third_party/zlib/crc32.h',
1675+
'<(V8_ROOT)/third_party/zlib/deflate.c',
1676+
'<(V8_ROOT)/third_party/zlib/deflate.h',
1677+
'<(V8_ROOT)/third_party/zlib/gzclose.c',
1678+
'<(V8_ROOT)/third_party/zlib/gzguts.h',
1679+
'<(V8_ROOT)/third_party/zlib/gzlib.c',
1680+
'<(V8_ROOT)/third_party/zlib/gzread.c',
1681+
'<(V8_ROOT)/third_party/zlib/gzwrite.c',
1682+
'<(V8_ROOT)/third_party/zlib/infback.c',
1683+
'<(V8_ROOT)/third_party/zlib/inffast.c',
1684+
'<(V8_ROOT)/third_party/zlib/inffast.h',
1685+
'<(V8_ROOT)/third_party/zlib/inffixed.h',
1686+
'<(V8_ROOT)/third_party/zlib/inflate.c',
1687+
'<(V8_ROOT)/third_party/zlib/inflate.h',
1688+
'<(V8_ROOT)/third_party/zlib/inftrees.c',
1689+
'<(V8_ROOT)/third_party/zlib/inftrees.h',
1690+
'<(V8_ROOT)/third_party/zlib/trees.c',
1691+
'<(V8_ROOT)/third_party/zlib/trees.h',
1692+
'<(V8_ROOT)/third_party/zlib/uncompr.c',
1693+
'<(V8_ROOT)/third_party/zlib/zconf.h',
1694+
'<(V8_ROOT)/third_party/zlib/zlib.h',
1695+
'<(V8_ROOT)/third_party/zlib/zutil.c',
1696+
'<(V8_ROOT)/third_party/zlib/zutil.h',
1697+
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.cc',
1698+
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.h',
1699+
],
16361700
}, # v8_zlib
16371701
],
16381702
}

0 commit comments

Comments
 (0)