Skip to content

Commit dfa62df

Browse files
committed
deps: merve: Don't include the vendored simdutf with --shared-simdutf
Different versions of simdutf may provide different implementations for the same name, for example, the vendored version provides a symbol for simdutf::find(), simdutf_warn_unused const char *find(const char *start, const char *end, char character) noexcept; while upstream simdutf 9.3.3 inlines it, simdutf_warn_unused simdutf_really_inline simdutf_constexpr23 const char * find(const char *start, const char *end, char character) noexcept { /* An inline function */ ... } However, the vendored simdutf's headers are currently unconditionally included for merve, regardless whether the shared simdutf is linked against or not, leading to missing symbols at linking time like mold: error: undefined symbol: simdutf::find(char const*, char const*, char) >>> referenced by merve.cpp >>> obj/deps/merve/libmerve.a(obj/deps/merve/merve.merve.o):(lexer::CJSLexer::addReexport(std::__1::basic_string_view<char, std::__1::char_traits<char>>, unsigned int)) >>> referenced by merve.cpp >>> obj/deps/merve/libmerve.a(obj/deps/merve/merve.merve.o):(lexer::CJSLexer::addExport(std::__1::basic_string_view<char, std::__1::char_traits<char>>, unsigned int)) Do not include the vendored simdutf when compiling merve if shared simdutf is used to ensure the headers match the linked library. Signed-off-by: Yao Zi <me@ziyao.cc>
1 parent 2929073 commit dfa62df

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎deps/merve/merve.gyp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
'type': 'static_library',
99
'include_dirs': [
1010
'.',
11-
'../v8/third_party/simdutf',
1211
],
1312
'direct_dependent_settings': {
1413
'include_dirs': ['.'],
@@ -29,6 +28,11 @@
2928
'CLANG_CXX_LANGUAGE_STANDARD': 'c++20',
3029
},
3130
}],
31+
['node_shared_simdutf=="false"', {
32+
'include_dirs': [
33+
'../v8/third_party/simdutf',
34+
],
35+
}],
3236
],
3337
},
3438
]

0 commit comments

Comments
 (0)