Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update V8 to 11.1 #46445

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tools: update V8 gypfiles for 11.1
  • Loading branch information
targos committed Jan 31, 2023
commit 1e078bc3f81449659f156f62ec2b5d4ac127ba97
25 changes: 20 additions & 5 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
# as per the --native-code-counters flag.
'v8_enable_snapshot_native_code_counters%': 0,

# Use pre-generated static root pointer values from static-roots.h.
'v8_enable_static_roots%': 0,

# Enable code-generation-time checking of types in the CodeStubAssembler.
'v8_enable_verify_csa%': 0,

Expand Down Expand Up @@ -168,10 +171,6 @@
# Enables various testing features.
'v8_enable_test_features%': 0,

# Enable the Maglev compiler.
# Sets -dV8_ENABLE_MAGLEV
'v8_enable_maglev%': 0,

# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
Expand Down Expand Up @@ -278,9 +277,19 @@
# Sets --DV8_LITE_MODE.
'v8_enable_lite_mode%': 0,

# Enable the Turbofan compiler.
# Sets -dV8_ENABLE_TURBOFAN
'v8_enable_turbofan%': 1,

# Enable the Maglev compiler.
# Sets -dV8_ENABLE_MAGLEV
'v8_enable_maglev%': 0,

# Include support for WebAssembly. If disabled, the 'WebAssembly' global
# will not be available, and embedder APIs to generate WebAssembly modules
# will fail.
# will fail. Also, asm.js will not be translated to WebAssembly and will be
# executed as standard JavaScript instead.
# Sets -dV8_ENABLE_WEBASSEMBLY.
'v8_enable_webassembly%': 1,

# Enable advanced BigInt algorithms, costing about 10-30 KiB binary size
Expand Down Expand Up @@ -428,6 +437,9 @@
['v8_enable_cet_shadow_stack==1', {
'defines': ['V8_ENABLE_CET_SHADOW_STACK',],
}],
['v8_enable_static_roots==1', {
'defines': ['V8_STATIC_ROOTS',],
}],
['v8_use_zlib==1', {
'defines': ['V8_USE_ZLIB',],
}],
Expand All @@ -437,6 +449,9 @@
['v8_enable_maglev==1', {
'defines': ['V8_ENABLE_MAGLEV',],
}],
['v8_enable_turbofan==1', {
'defines': ['V8_ENABLE_TURBOFAN',],
}],
['v8_enable_swiss_name_dictionary==1', {
'defines': ['V8_ENABLE_SWISS_NAME_DICTIONARY',],
}],
Expand Down
2 changes: 2 additions & 0 deletions tools/v8_gypfiles/inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
'inspector_all_sources': [
'<(V8_ROOT)/include/v8-inspector.h',
'<(V8_ROOT)/include/v8-inspector-protocol.h',
'<(V8_ROOT)/src/inspector/crc32.cc',
'<(V8_ROOT)/src/inspector/crc32.h',
'<(V8_ROOT)/src/inspector/custom-preview.cc',
'<(V8_ROOT)/src/inspector/custom-preview.h',
'<(V8_ROOT)/src/inspector/injected-script.cc',
Expand Down
118 changes: 94 additions & 24 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'torque_outputs_inl_inc': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s-inl.inc" <@(torque_files_replaced))'],
'torque_outputs_cc': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s.cc" <@(torque_files_replaced))'],
'torque_outputs_inc': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s.inc" <@(torque_files_replaced))'],
'v8_compiler_sources': ['<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources = ")'],
'conditions': [
['v8_enable_i18n_support==1', {
'torque_files': [
Expand All @@ -32,9 +31,6 @@
'torque_files': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "torque_files =.*?v8_enable_webassembly.*?torque_files \\+= ")',
],
'v8_compiler_sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_webassembly.*?v8_compiler_sources \\+= ")',
],
}],
],
},
Expand Down Expand Up @@ -678,7 +674,67 @@
},
}, # v8_internal_headers
{
'target_name': 'v8_compiler_opt',
'target_name': 'v8_compiler_sources',
'type': 'none',
'toolsets': ['host', 'target'],
'direct_dependent_settings': {
'sources': ['<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources = ")'],
'conditions': [
['v8_target_arch=="ia32"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"x86\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="x64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"x64\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="arm"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"arm\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="arm64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"arm64\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"mips64\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="ppc"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"ppc\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="ppc64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"ppc64\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="s390x"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"s390x\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_target_arch=="riscv64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_current_cpu == \\"riscv64\\".*?v8_compiler_sources \\+= ")',
],
}],
['v8_enable_webassembly==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_webassembly.*?v8_compiler_sources \\+= ")',
],
}],
],
}
}, # v8_compiler_sources
{
'target_name': 'v8_compiler_for_mksnapshot_source_set',
'type': 'static_library',
'toolsets': ['host', 'target'],
'dependencies': [
Expand All @@ -690,7 +746,6 @@
'v8_libbase',
'v8_shared_internal_headers',
],
'sources': ['<@(v8_compiler_sources)'],
'conditions': [
['OS=="win"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
Expand All @@ -700,8 +755,13 @@
'<(_msvs_precompiled_source)',
],
}],
['v8_enable_turbofan==1', {
'dependencies': ['v8_compiler_sources'],
}, {
'sources': ['<(V8_ROOT)/src/compiler/turbofan-disabled.cc'],
}],
],
}, # v8_compiler_opt
}, # v8_compiler_for_mksnapshot_source_set
{
'target_name': 'v8_compiler',
'type': 'static_library',
Expand All @@ -716,8 +776,12 @@
'v8_shared_internal_headers',
'v8_turboshaft',
],
'sources': ['<@(v8_compiler_sources)'],
'conditions': [
['v8_enable_turbofan==1', {
'dependencies': ['v8_compiler_sources'],
}, {
'sources': ['<(V8_ROOT)/src/compiler/turbofan-disabled.cc'],
}],
['OS=="win"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
Expand Down Expand Up @@ -766,12 +830,12 @@
'v8_maybe_icu',
],
'conditions': [
['is_component_build and not v8_optimized_debug and v8_enable_fast_mksnapshot', {
['(is_component_build and not v8_optimized_debug and v8_enable_fast_mksnapshot) or v8_enable_turbofan==0', {
'dependencies': [
'v8_compiler_opt',
'v8_compiler_for_mksnapshot_source_set',
],
'export_dependent_settings': [
'v8_compiler_opt',
'v8_compiler_for_mksnapshot_source_set',
],
}, {
'dependencies': [
Expand Down Expand Up @@ -1036,7 +1100,13 @@
'dependencies': [
'v8_base_without_compiler',
'v8_compiler',
'v8_turboshaft',
],
'conditions': [
['v8_enable_turbofan==1', {
'dependencies': [
'v8_turboshaft',
],
}],
],
}, # v8_base
{
Expand Down Expand Up @@ -1661,47 +1731,47 @@
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/x64/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/x64/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "ia32" or _toolset == "target" and target_arch=="ia32"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/ia32/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/ia32/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "arm" or _toolset == "target" and target_arch=="arm"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/arm/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/arm/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "arm64" or _toolset == "target" and target_arch=="arm64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/arm64/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "ppc64" or _toolset == "target" and target_arch=="ppc64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/ppc/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/ppc/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "s390x" or _toolset == "target" and target_arch=="s390x"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/s390/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/s390/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "mips64" or _toolset == "target" and target_arch=="mips64" or _toolset == "host" and host_arch == "mips64el" or _toolset == "target" and target_arch=="mips64el"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/mips64/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/mips64/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "riscv64" or _toolset == "target" and target_arch=="riscv64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/riscv/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/riscv/push_registers_asm.cc',
],
}],
['_toolset == "host" and host_arch == "loong64" or _toolset == "target" and target_arch=="loong64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/loong64/save_registers_asm.cc',
'<(V8_ROOT)/src/heap/base/asm/loong64/push_registers_asm.cc',
],
}],
]
Expand All @@ -1710,17 +1780,17 @@
'conditions': [
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/x64/save_registers_masm.asm',
'<(V8_ROOT)/src/heap/base/asm/x64/push_registers_masm.asm',
],
}],
['_toolset == "host" and host_arch == "ia32" or _toolset == "target" and target_arch=="ia32"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/ia32/save_registers_masm.asm',
'<(V8_ROOT)/src/heap/base/asm/ia32/push_registers_masm.asm',
],
}],
['_toolset == "host" and host_arch == "arm64" or _toolset == "target" and target_arch=="arm64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/arm64/save_registers_masm.S',
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_masm.S',
],
}],
],
Expand Down