tools: update V8 gypfiles for 9.3

PR-URL: https://github.com/nodejs/node/pull/39469
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Michaël Zasso 2021-06-12 20:13:48 +02:00
parent 66af7e965a
commit bcc449de4a
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
3 changed files with 117 additions and 35 deletions

View File

@ -103,6 +103,9 @@
# Sets -dENABLE_GDB_JIT_INTERFACE.
'v8_enable_gdbjit%': 0,
# Sets -dENABLE_HUGEPAGE
'v8_enable_hugepage%': 0,
# Currently set for node by common.gypi, avoiding default because of gyp file bug.
# Should be turned on only for debugging.
#'v8_enable_handle_zapping%': 0,
@ -217,6 +220,13 @@
# Sets -DV8_DICT_PROPERTY_CONST_TRACKING
'v8_dict_property_const_tracking%': 0,
# Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING).
# When it's disabled, the --turbo-allocation-folding runtime flag will be ignored.
'v8_enable_allocation_folding%': 1,
# Enable global allocation site tracking.
'v8_allocation_site_tracking%': 1,
# Variables from v8.gni
# Enable ECMAScript Internationalization API. Enabling this feature will
@ -232,6 +242,10 @@
# will not be available, and embedder APIs to generate WebAssembly modules
# will fail.
'v8_enable_webassembly%': 1,
# Enable advanced BigInt algorithms, costing about 10-30 KB binary size
# depending on platform.
'v8_advanced_bigint_algorithms%': 1
},
'target_defaults': {
@ -257,6 +271,9 @@
['v8_enable_gdbjit==1', {
'defines': ['ENABLE_GDB_JIT_INTERFACE',],
}],
['v8_enable_hugepage==1', {
'defines': ['ENABLE_HUGEPAGE',],
}],
['v8_enable_minor_mc==1', {
'defines': ['ENABLE_MINOR_MC',],
}],
@ -371,6 +388,12 @@
['v8_dict_property_const_tracking==1', {
'defines': ['V8_DICT_PROPERTY_CONST_TRACKING',],
}],
['v8_enable_allocation_folding==1', {
'defines': ['V8_ALLOCATION_FOLDING',],
}],
['v8_allocation_site_tracking==1', {
'defines': ['V8_ALLOCATION_SITE_TRACKING',],
}],
], # conditions
'defines': [
'V8_GYP_BUILD',

View File

@ -996,6 +996,36 @@
},
},
}],
['OS=="android"', {
'defines': [
'V8_HAVE_TARGET_OS',
'V8_TARGET_OS_ANDROID',
]
}],
['OS=="ios"', {
'defines': [
'V8_HAVE_TARGET_OS',
'V8_TARGET_OS_IOS',
]
}],
['OS=="linux"', {
'defines': [
'V8_HAVE_TARGET_OS',
'V8_TARGET_OS_LINUX',
]
}],
['OS=="mac"', {
'defines': [
'V8_HAVE_TARGET_OS',
'V8_TARGET_OS_MACOSX',
]
}],
['OS=="win"', {
'defines': [
'V8_HAVE_TARGET_OS',
'V8_TARGET_OS_WIN',
]
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
v8_target_arch=="ia32"', {

View File

@ -580,100 +580,110 @@
],
'direct_dependent_settings': {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?sources = ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?sources = ")',
],
'conditions': [
['v8_enable_webassembly==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_enable_webassembly.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_webassembly.*?sources \\+= ")',
],
}],
['v8_enable_i18n_support==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_enable_i18n_support.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?sources \\+= ")',
],
}],
['v8_control_flow_integrity==1', {
['v8_control_flow_integrity==0', {
'sources': [
'<(V8_ROOT)/src/execution/arm64/pointer-authentication-arm64.h',
],
}, {
'sources': [
'<(V8_ROOT)/src/execution/pointer-authentication-dummy.h',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?!v8_control_flow_integrity.*?sources \\+= ")',
],
}],
['v8_target_arch=="ia32"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"x86.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x86\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="x64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"x64.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x64\\".*?sources \\+= ")',
],
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?is_linux.*?sources \\+= ")',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?is_win.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x64\\".*?is_win.*?sources \\+= ")',
],
}],
['v8_enable_webassembly==1', {
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_win.*?sources \\+= ")',
],
}],
],
}],
],
}],
['v8_target_arch=="arm"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"arm.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"arm\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="arm64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"arm64.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"arm64\\".*?sources \\+= ")',
],
'conditions': [
['OS=="mac"', {
['v8_control_flow_integrity==1', {
'sources': [
"<(V8_ROOT)/src/trap-handler/handler-inside-posix.h",
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"arm64\\".*?v8_control_flow_integrity.*?sources \\+= ")',
],
}],
['v8_enable_webassembly==1 and OS=="mac"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"arm64\\".*?v8_enable_webassembly.*?is_mac.*?sources \\+= ")',
],
}],
['OS=="win"', {
'sources': [
"<(V8_ROOT)/src/diagnostics/unwinding-info-win64.h"
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"arm64\\".*?is_win.*?sources \\+= ")',
],
}],
],
}],
['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"mips\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"mips\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"mips64\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"mips64\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="ppc"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"ppc\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"ppc\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="ppc64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"ppc64\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"ppc64\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="s390x"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"s390\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"s390\\".*?sources \\+= ")',
],
}],
['v8_target_arch=="riscv64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_internal_headers.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
],
}],
],
@ -818,17 +828,26 @@
}],
['v8_target_arch=="x64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64\\".*?sources \\+= ")',
],
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?is_linux.*?sources \\+= ")',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?is_win.*?sources \\+= ")',
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64\\".*?is_win.*?sources \\+= ")',
],
}],
['v8_enable_webassembly==1', {
'conditions': [
['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
],
}],
['OS=="win"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_win.*?sources \\+= ")',
],
}],
],
}],
],
@ -1583,6 +1602,16 @@
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_source_set.\\"v8_bigint.*?sources = ")',
],
'conditions': [
['v8_advanced_bigint_algorithms==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_source_set.\\"v8_bigint.*?v8_advanced_bigint_algorithms.*?sources \\+= ")',
],
'defines': [
'V8_ADVANCED_BIGINT_ALGORITHMS',
],
}],
],
},
}, # v8_bigint
{