Skip to content

Commit

Permalink
tools: update V8 gypfiles for V8 8.3
Browse files Browse the repository at this point in the history
Backport-PR-URL: #33376
PR-URL: #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>
  • Loading branch information
targos committed Jun 2, 2020
1 parent 4ccaa53 commit 2c59f9b
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 23 deletions.
17 changes: 15 additions & 2 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

# Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
'v8_enable_pointer_compression%': 0,
'v8_enable_31bit_smis_on_64bit_arch%': 1,
'v8_enable_31bit_smis_on_64bit_arch%': 0,

# Sets -dOBJECT_PRINT.
'v8_enable_object_print%': 0,
Expand All @@ -147,7 +147,7 @@
'v8_enable_concurrent_marking%': 1,

# Sets -dV8_ARRAY_BUFFER_EXTENSION
'v8_enable_array_buffer_extension%': 0,
'v8_enable_array_buffer_extension%': 1,

# Enables various testing features.
'v8_enable_test_features%': 0,
Expand Down Expand Up @@ -196,6 +196,13 @@
# Use switch-based dispatch if this is false.
'v8_enable_regexp_interpreter_threaded_dispatch%': 1,

# Disable all snapshot compression.
'v8_enable_snapshot_compression%': 1,

# Enable control-flow integrity features, such as pointer authentication
# for ARM64.
'v8_control_flow_integrity%': 0,

# Variables from v8.gni

# Enable ECMAScript Internationalization API. Enabling this feature will
Expand Down Expand Up @@ -325,6 +332,12 @@
['v8_enable_regexp_interpreter_threaded_dispatch==1', {
'defines': ['V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH',],
}],
['v8_enable_snapshot_compression==1', {
'defines': ['V8_SNAPSHOT_COMPRESSION',],
}],
['v8_control_flow_integrity==1', {
'defines': ['V8_ENABLE_CONTROL_FLOW_INTEGRITY',],
}],
], # conditions
'defines': [
'V8_EMBEDDED_BUILTINS',
Expand Down
13 changes: 6 additions & 7 deletions tools/v8_gypfiles/inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@
'inspector_protocol_files': [
'<(inspector_protocol_path)/lib/base_string_adapter_cc.template',
'<(inspector_protocol_path)/lib/base_string_adapter_h.template',
'<(inspector_protocol_path)/lib/DispatcherBase_cpp.template',
'<(inspector_protocol_path)/lib/DispatcherBase_h.template',
'<(inspector_protocol_path)/lib/ErrorSupport_cpp.template',
'<(inspector_protocol_path)/lib/ErrorSupport_h.template',
'<(inspector_protocol_path)/lib/Forward_h.template',
'<(inspector_protocol_path)/lib/FrontendChannel_h.template',
'<(inspector_protocol_path)/lib/Object_cpp.template',
'<(inspector_protocol_path)/lib/Object_h.template',
'<(inspector_protocol_path)/lib/Parser_cpp.template',
'<(inspector_protocol_path)/lib/Parser_h.template',
'<(inspector_protocol_path)/lib/Protocol_cpp.template',
'<(inspector_protocol_path)/lib/ValueConversions_h.template',
'<(inspector_protocol_path)/lib/Values_cpp.template',
Expand Down Expand Up @@ -111,14 +104,20 @@
# Flat merge `third_party/inspector_protocol:crdtp`
'<(inspector_protocol_path)/crdtp/cbor.cc',
'<(inspector_protocol_path)/crdtp/cbor.h',
'<(inspector_protocol_path)/crdtp/dispatch.cc',
'<(inspector_protocol_path)/crdtp/dispatch.h',
'<(inspector_protocol_path)/crdtp/error_support.cc',
'<(inspector_protocol_path)/crdtp/error_support.h',
'<(inspector_protocol_path)/crdtp/export.h',
'<(inspector_protocol_path)/crdtp/find_by_first.h',
'<(inspector_protocol_path)/crdtp/glue.h',
'<(inspector_protocol_path)/crdtp/json.cc',
'<(inspector_protocol_path)/crdtp/json.h',
'<(inspector_protocol_path)/crdtp/parser_handler.h',
'<(inspector_protocol_path)/crdtp/serializable.cc',
'<(inspector_protocol_path)/crdtp/serializable.h',
'<(inspector_protocol_path)/crdtp/serializer_traits.h',
'<(inspector_protocol_path)/crdtp/span.cc',
'<(inspector_protocol_path)/crdtp/span.h',
'<(inspector_protocol_path)/crdtp/status.cc',
'<(inspector_protocol_path)/crdtp/status.h',
Expand Down
14 changes: 11 additions & 3 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,17 @@
'defines': [
'V8_TARGET_ARCH_ARM64',
],
'conditions': [
['v8_control_flow_integrity==1', {
'cflags': [ '-mbranch-protection=standard' ],
}],
],
}],
['v8_target_arch=="s390x"', {
'defines': [
'V8_TARGET_ARCH_S390',
],
'cflags': [ '-ffp-contract=off' ],
'conditions': [
['v8_target_arch=="s390x"', {
'defines': [
Expand All @@ -319,10 +325,12 @@
],
}], # s390x
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
'defines': [
'V8_TARGET_ARCH_PPC',
],
'conditions': [
['v8_target_arch=="ppc"', {
'defines': [
'V8_TARGET_ARCH_PPC',
],
}],
['v8_target_arch=="ppc64"', {
'defines': [
'V8_TARGET_ARCH_PPC64',
Expand Down
86 changes: 75 additions & 11 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,14 @@
'<(torque_output_root)/torque-generated/bit-fields-tq.h',
'<(torque_output_root)/torque-generated/builtin-definitions-tq.h',
'<(torque_output_root)/torque-generated/interface-descriptors-tq.inc',
'<(torque_output_root)/torque-generated/factory-tq.cc',
'<(torque_output_root)/torque-generated/factory-tq.inc',
'<(torque_output_root)/torque-generated/field-offsets-tq.h',
'<(torque_output_root)/torque-generated/class-verifiers-tq.cc',
'<(torque_output_root)/torque-generated/class-verifiers-tq.h',
'<(torque_output_root)/torque-generated/enum-verifiers-tq.cc',
'<(torque_output_root)/torque-generated/objects-printer-tq.cc',
'<(torque_output_root)/torque-generated/objects-body-descriptors-tq-inl.h',
'<(torque_output_root)/torque-generated/class-definitions-tq.cc',
'<(torque_output_root)/torque-generated/class-definitions-tq-inl.h',
'<(torque_output_root)/torque-generated/class-definitions-tq.h',
Expand Down Expand Up @@ -309,6 +312,7 @@
'<(torque_output_root)/torque-generated/class-definitions-tq.cc',
'<(torque_output_root)/torque-generated/class-verifiers-tq.cc',
'<(torque_output_root)/torque-generated/class-verifiers-tq.h',
'<(torque_output_root)/torque-generated/factory-tq.cc',
'<(torque_output_root)/torque-generated/objects-printer-tq.cc',
],
'include_dirs': [
Expand Down Expand Up @@ -425,7 +429,12 @@
'<(V8_ROOT)/src/builtins/mips64/builtins-mips64.cc',
],
}],
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
['v8_target_arch=="ppc"', {
'sources': [
'<(V8_ROOT)/src/builtins/ppc/builtins-ppc.cc',
],
}],
['v8_target_arch=="ppc64"', {
'sources': [
'<(V8_ROOT)/src/builtins/ppc/builtins-ppc.cc',
],
Expand Down Expand Up @@ -595,6 +604,7 @@
],
'direct_dependent_settings': {
'sources': [
'<(V8_ROOT)/include/v8-fast-api-calls.h',
'<(V8_ROOT)/include/v8-internal.h',
'<(V8_ROOT)/include/v8.h',
'<(V8_ROOT)/include/v8config.h',
Expand Down Expand Up @@ -738,6 +748,15 @@
['want_separate_host_toolset', {
'toolsets': ['host', 'target'],
}],
['v8_control_flow_integrity==1', {
'sources': [
'<(V8_ROOT)/src/execution/arm64/pointer-authentication-arm64.h',
],
}, {
'sources': [
'<(V8_ROOT)/src/execution/pointer-authentication-dummy.h',
],
}],
['v8_target_arch=="ia32"', {
'sources': [ ### gcmole(arch:ia32) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x86.*?sources \+= ")',
Expand All @@ -764,12 +783,12 @@
}],
['v8_target_arch=="arm"', {
'sources': [ ### gcmole(arch:arm) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm\\".*?sources \+= ")',
],
}],
['v8_target_arch=="arm64"', {
'sources': [ ### gcmole(arch:arm64) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64\\".*?sources \+= ")',
],
'conditions': [
['OS=="win"', {
Expand All @@ -790,22 +809,27 @@
}],
['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
'sources': [ ### gcmole(arch:mipsel) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips\\".*?sources \+= ")',
],
}],
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
'sources': [ ### gcmole(arch:mips64el) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"mips64\\".*?sources \+= ")',
],
}],
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
['v8_target_arch=="ppc"', {
'sources': [ ### gcmole(arch:ppc) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc\\".*?sources \+= ")',
],
}],
['v8_target_arch=="ppc64"', {
'sources': [ ### gcmole(arch:ppc64) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"ppc64\\".*?sources \+= ")',
],
}],
['v8_target_arch=="s390x"', {
'sources': [ ### gcmole(arch:s390) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390.*?sources \+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"s390\\".*?sources \+= ")',
],
}],
['OS=="win"', {
Expand Down Expand Up @@ -1628,11 +1652,51 @@
}],
],
'direct_dependent_settings': {
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
],
},
'defines': [ 'ZLIB_IMPLEMENTATION' ],
'include_dirs': [ '<(V8_ROOT)/third_party/zlib' ],
'sources': [ '<(V8_ROOT)/third_party/zlib/adler32.c' ],
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
],
'sources': [
'<(V8_ROOT)/third_party/zlib/adler32.c',
'<(V8_ROOT)/third_party/zlib/chromeconf.h',
'<(V8_ROOT)/third_party/zlib/compress.c',
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
'<(V8_ROOT)/third_party/zlib/contrib/optimizations/insert_string.h',
'<(V8_ROOT)/third_party/zlib/cpu_features.c',
'<(V8_ROOT)/third_party/zlib/cpu_features.h',
'<(V8_ROOT)/third_party/zlib/crc32.c',
'<(V8_ROOT)/third_party/zlib/crc32.h',
'<(V8_ROOT)/third_party/zlib/deflate.c',
'<(V8_ROOT)/third_party/zlib/deflate.h',
'<(V8_ROOT)/third_party/zlib/gzclose.c',
'<(V8_ROOT)/third_party/zlib/gzguts.h',
'<(V8_ROOT)/third_party/zlib/gzlib.c',
'<(V8_ROOT)/third_party/zlib/gzread.c',
'<(V8_ROOT)/third_party/zlib/gzwrite.c',
'<(V8_ROOT)/third_party/zlib/infback.c',
'<(V8_ROOT)/third_party/zlib/inffast.c',
'<(V8_ROOT)/third_party/zlib/inffast.h',
'<(V8_ROOT)/third_party/zlib/inffixed.h',
'<(V8_ROOT)/third_party/zlib/inflate.c',
'<(V8_ROOT)/third_party/zlib/inflate.h',
'<(V8_ROOT)/third_party/zlib/inftrees.c',
'<(V8_ROOT)/third_party/zlib/inftrees.h',
'<(V8_ROOT)/third_party/zlib/trees.c',
'<(V8_ROOT)/third_party/zlib/trees.h',
'<(V8_ROOT)/third_party/zlib/uncompr.c',
'<(V8_ROOT)/third_party/zlib/zconf.h',
'<(V8_ROOT)/third_party/zlib/zlib.h',
'<(V8_ROOT)/third_party/zlib/zutil.c',
'<(V8_ROOT)/third_party/zlib/zutil.h',
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.cc',
'<(V8_ROOT)/third_party/zlib/google/compression_utils_portable.h',
],
}, # v8_zlib
],
}

0 comments on commit 2c59f9b

Please sign in to comment.