Skip to content

Commit f795b32

Browse files
committed
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
1 parent dc902d9 commit f795b32

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

node.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@
13261326
],
13271327
'conditions': [
13281328
[ 'node_shared_simdutf=="false"', {
1329-
'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf#host' ],
1329+
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ],
13301330
}],
13311331
[ 'node_shared_libuv=="false"', {
13321332
'dependencies': [ 'deps/uv/uv.gyp:libuv#host' ],

node.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
}],
223223

224224
[ 'node_shared_simdutf=="false"', {
225-
'dependencies': [ 'deps/simdutf/simdutf.gyp:simdutf' ],
225+
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf' ],
226226
}],
227227

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

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: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,8 @@
10041004
'v8_pch',
10051005
'v8_abseil',
10061006
'fp16',
1007+
'highway',
1008+
'simdutf',
10071009
],
10081010
'includes': ['inspector.gypi'],
10091011
'direct_dependent_settings': {
@@ -2527,5 +2529,63 @@
25272529
],
25282530
},
25292531
}, # fp16
2532+
{
2533+
'target_name': 'highway',
2534+
'type': 'static_library',
2535+
'toolsets': ['host', 'target'],
2536+
'variables': {
2537+
'HIGHWAY_ROOT': '../../deps/v8/third_party/highway',
2538+
},
2539+
'direct_dependent_settings': {
2540+
'include_dirs': [
2541+
'<(HIGHWAY_ROOT)/src',
2542+
],
2543+
'conditions': [
2544+
['v8_target_arch=="ia32"', {
2545+
'defines': ['HWY_BROKEN_TARGETS=(HWY_AVX2|HWY_AVX3)',],
2546+
}],
2547+
['v8_target_arch=="arm64"', {
2548+
'defines': ['HWY_BROKEN_TARGETS=HWY_ALL_SVE',],
2549+
}],
2550+
['v8_target_arch=="ppc64" or v8_target_arch=="s390x"', {
2551+
'defines': ['TOOLCHAIN_MISS_ASM_HWCAP_H',],
2552+
}],
2553+
['v8_target_arch=="s390x"', {
2554+
'defines': ['HWY_BROKEN_EMU128=0',],
2555+
}],
2556+
],
2557+
},
2558+
'include_dirs': [
2559+
'<(HIGHWAY_ROOT)/src',
2560+
],
2561+
'conditions': [
2562+
['v8_target_arch=="ia32"', {
2563+
'defines': ['HWY_BROKEN_TARGETS=(HWY_AVX2|HWY_AVX3)',],
2564+
}],
2565+
['v8_target_arch=="arm64"', {
2566+
'defines': ['HWY_BROKEN_TARGETS=HWY_ALL_SVE',],
2567+
}],
2568+
['v8_target_arch=="ppc64" or v8_target_arch=="s390x"', {
2569+
'defines': ['TOOLCHAIN_MISS_ASM_HWCAP_H',],
2570+
}],
2571+
],
2572+
'sources': [
2573+
'<!@pymod_do_main(GN-scraper "<(HIGHWAY_ROOT)/BUILD.gn" "source_set.\\"libhwy.*?sources = ")',
2574+
],
2575+
}, # highway
2576+
{
2577+
'target_name': 'simdutf',
2578+
'type': 'static_library',
2579+
'toolsets': ['host', 'target'],
2580+
'direct_dependent_settings': {
2581+
'include_dirs': [
2582+
'<(V8_ROOT)/third_party/simdutf',
2583+
],
2584+
},
2585+
'include_dirs': ['.'],
2586+
'sources': [
2587+
'<(V8_ROOT)/third_party/simdutf/simdutf.cpp',
2588+
],
2589+
}, # simdutf
25302590
],
25312591
}

0 commit comments

Comments
 (0)