Skip to content

Commit 3d1fe71

Browse files
targosabmusse
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]>
1 parent 4e10a3a commit 3d1fe71

File tree

6 files changed

+83
-3
lines changed

6 files changed

+83
-3
lines changed

node.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@
13301330
],
13311331
'conditions': [
13321332
[ 'node_shared_simdutf=="false"', {
1333-
'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf#host' ],
1333+
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ],
13341334
}],
13351335
[ 'node_shared_libuv=="false"', {
13361336
'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/abseil.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@
280280
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter.h',
281281
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter_base.h',
282282
'<(ABSEIL_ROOT)/absl/synchronization/internal/waiter_base.cc',
283+
'<(ABSEIL_ROOT)/absl/synchronization/internal/win32_waiter.h',
284+
'<(ABSEIL_ROOT)/absl/synchronization/internal/win32_waiter.cc',
283285
'<(ABSEIL_ROOT)/absl/synchronization/mutex.h',
284286
'<(ABSEIL_ROOT)/absl/synchronization/mutex.cc',
285287
'<(ABSEIL_ROOT)/absl/time/civil_time.h',

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
@@ -807,7 +807,10 @@
807807
}],
808808
# Temporary refs: https://github.com/nodejs/node/pull/23801
809809
['v8_enable_handle_zapping==1', {
810-
'defines': ['ENABLE_HANDLE_ZAPPING',],
810+
'defines': [
811+
'ENABLE_LOCAL_HANDLE_ZAPPING',
812+
'ENABLE_GLOBAL_HANDLE_ZAPPING',
813+
],
811814
}],
812815
],
813816

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)