Skip to content

Commit fb3d5ea

Browse files
targosabmusse
authored andcommitted
tools: update V8 gypfiles for 13.4
Build Node.js with simdutf version from V8. Refs: v8/v8@d629051 Refs: v8/v8@616c875 Refs: v8/v8@e3204d5 Refs: v8/v8@e8293d2 Refs: v8/v8@aeb2220 Refs: v8/v8@5621164 Co-authored-by: Abdirahim Musse <[email protected]> PR-URL: #58070 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 756abac commit fb3d5ea

File tree

5 files changed

+81
-3
lines changed

5 files changed

+81
-3
lines changed

node.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@
13321332
],
13331333
'conditions': [
13341334
[ 'node_shared_simdutf=="false"', {
1335-
'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf#host' ],
1335+
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ],
13361336
}],
13371337
[ 'node_shared_libuv=="false"', {
13381338
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],

node.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
}],
227227

228228
[ 'node_shared_simdutf=="false"', {
229-
'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf' ],
229+
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf' ],
230230
}],
231231

232232
[ 'node_shared_brotli=="false"', {

tools/v8_gypfiles/features.gypi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
}, {
8888
'v8_enable_private_mapping_fork_optimization': 0,
8989
}],
90+
91+
['OS in "aix os400"', {
92+
'v8_enable_leaptiering': 0,
93+
}, {
94+
'v8_enable_leaptiering': 1,
95+
}],
9096
],
9197

9298
# Variables from BUILD.gn
@@ -483,6 +489,9 @@
483489
['v8_enable_extensible_ro_snapshot==1', {
484490
'defines': ['V8_ENABLE_EXTENSIBLE_RO_SNAPSHOT',],
485491
}],
492+
['v8_enable_leaptiering==1', {
493+
'defines': ['V8_ENABLE_LEAPTIERING',],
494+
}],
486495
['v8_enable_precise_zone_stats==1', {
487496
'defines': ['V8_ENABLE_PRECISE_ZONE_STATS',],
488497
}],

tools/v8_gypfiles/toolchain.gypi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,10 @@
716716
}],
717717
# Temporary refs: https://github.com/nodejs/node/pull/23801
718718
['v8_enable_handle_zapping==1', {
719-
'defines': ['ENABLE_HANDLE_ZAPPING',],
719+
'defines': [
720+
'ENABLE_LOCAL_HANDLE_ZAPPING',
721+
'ENABLE_GLOBAL_HANDLE_ZAPPING',
722+
],
720723
}],
721724
],
722725

tools/v8_gypfiles/v8.gyp

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,8 @@
10561056
'v8_zlib',
10571057
'v8_pch',
10581058
'fp16',
1059+
'highway',
1060+
'simdutf',
10591061
'abseil.gyp:abseil',
10601062
],
10611063
'includes': ['inspector.gypi'],
@@ -2260,5 +2262,69 @@
22602262
],
22612263
},
22622264
}, # fp16
2265+
{
2266+
'target_name': 'highway',
2267+
'type': 'static_library',
2268+
'toolsets': ['host', 'target'],
2269+
'variables': {
2270+
'HIGHWAY_ROOT': '../../deps/v8/third_party/highway',
2271+
},
2272+
'direct_dependent_settings': {
2273+
'include_dirs': [
2274+
'<(HIGHWAY_ROOT)/src',
2275+
],
2276+
'conditions': [
2277+
['v8_target_arch=="ia32"', {
2278+
'defines': ['HWY_BROKEN_TARGETS=(HWY_AVX2|HWY_AVX3)',],
2279+
}],
2280+
['v8_target_arch=="arm64"', {
2281+
'defines': ['HWY_BROKEN_TARGETS=HWY_ALL_SVE',],
2282+
}],
2283+
['v8_target_arch=="ppc64" or v8_target_arch=="s390x"', {
2284+
'defines': ['TOOLCHAIN_MISS_ASM_HWCAP_H',],
2285+
}],
2286+
['v8_target_arch=="s390x"', {
2287+
'defines': ['HWY_BROKEN_EMU128=0',],
2288+
}],
2289+
['OS == "aix"', {
2290+
'defines': ['HWY_BROKEN_EMU128=0',],
2291+
}],
2292+
['v8_target_arch=="arm" and arm_version==7', {
2293+
'defines': ['HWY_BROKEN_EMU128=0',],
2294+
}],
2295+
],
2296+
},
2297+
'include_dirs': [
2298+
'<(HIGHWAY_ROOT)/src',
2299+
],
2300+
'conditions': [
2301+
['v8_target_arch=="ia32"', {
2302+
'defines': ['HWY_BROKEN_TARGETS=(HWY_AVX2|HWY_AVX3)',],
2303+
}],
2304+
['v8_target_arch=="arm64"', {
2305+
'defines': ['HWY_BROKEN_TARGETS=HWY_ALL_SVE',],
2306+
}],
2307+
['v8_target_arch=="ppc64" or v8_target_arch=="s390x"', {
2308+
'defines': ['TOOLCHAIN_MISS_ASM_HWCAP_H',],
2309+
}],
2310+
],
2311+
'sources': [
2312+
'<!@pymod_do_main(GN-scraper "<(HIGHWAY_ROOT)/BUILD.gn" "source_set.\\"libhwy.*?sources = ")',
2313+
],
2314+
}, # highway
2315+
{
2316+
'target_name': 'simdutf',
2317+
'type': 'static_library',
2318+
'toolsets': ['host', 'target'],
2319+
'direct_dependent_settings': {
2320+
'include_dirs': [
2321+
'<(V8_ROOT)/third_party/simdutf',
2322+
],
2323+
},
2324+
'include_dirs': ['.'],
2325+
'sources': [
2326+
'<(V8_ROOT)/third_party/simdutf/simdutf.cpp',
2327+
],
2328+
}, # simdutf
22632329
],
22642330
}

0 commit comments

Comments
 (0)