Skip to content

Commit 6f94000

Browse files
committed
deps: use shared V8 simdutf
1 parent 90940fc commit 6f94000

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

common.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'node_with_ltcg%': '',
2323
'node_shared_openssl%': 'false',
2424
'v8_use_system_zlib%': 0,
25+
'v8_use_system_simdutf%': 0,
2526

2627
'node_tag%': '',
2728
'uv_library%': 'static_library',

configure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,7 @@ def configure_v8(o, configs):
18201820
raise Exception('--v8-enable-hugepage is supported only on linux.')
18211821
o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0
18221822
o['variables']['v8_use_system_zlib'] = 1 if options.shared_zlib else 0
1823+
o['variables']['v8_use_system_simdutf'] = 1 if options.shared_simdutf else 0
18231824
if options.v8_enable_short_builtin_calls or o['variables']['target_arch'] == 'x64':
18241825
o['variables']['v8_enable_short_builtin_calls'] = 1
18251826
if options.v8_enable_snapshot_compression:

tools/v8_gypfiles/v8.gyp

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2389,14 +2389,27 @@
23892389
'target_name': 'simdutf',
23902390
'type': 'static_library',
23912391
'toolsets': ['host', 'target'],
2392-
'direct_dependent_settings': {
2393-
'include_dirs': [
2394-
'<(V8_ROOT)/third_party/simdutf',
2395-
],
2396-
},
2397-
'include_dirs': ['.'],
2398-
'sources': [
2399-
'<(V8_ROOT)/third_party/simdutf/simdutf.cpp',
2392+
'conditions': [
2393+
['v8_use_system_simdutf==0', {
2394+
'direct_dependent_settings': {
2395+
'include_dirs': [
2396+
'<(V8_ROOT)/third_party/simdutf',
2397+
],
2398+
},
2399+
'include_dirs': ['.'],
2400+
'sources': [
2401+
'<(V8_ROOT)/third_party/simdutf/simdutf.cpp',
2402+
],
2403+
}, {
2404+
# Use system simdutf
2405+
'direct_dependent_settings': {
2406+
'defines': [ 'USE_SYSTEM_SIMDUTF' ],
2407+
},
2408+
'defines': [ 'USE_SYSTEM_SIMDUTF' ],
2409+
'link_settings': {
2410+
'libraries': [ '-lsimdutf' ],
2411+
},
2412+
}],
24002413
],
24012414
}, # simdutf
24022415
],

0 commit comments

Comments
 (0)