Skip to content

Commit b25df9d

Browse files
committed
deps: update simdjson to 4.0.7
nodejs/node#59883
1 parent a551989 commit b25df9d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ Without this patch, building with simdjson fails with
88
> error: identifier '_padded' preceded by whitespace in a literal operator
99
> declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
1010

11+
and
12+
> error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
13+
1114
This patch can be removed once this is fixed upstream in simdjson.
1215

1316
diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
14-
index a8bd86b28acc16cb04c193a1afbeb8171b314107..4be1b84b2e4cdc221139b4832e0f7692ac7b8b85 100644
17+
index a8bd86b28acc16cb04c193a1afbeb8171b314107..e28208f9c0e7e13de48e58efaf063596fe6bea2d 100644
1518
--- a/deps/simdjson/simdjson.h
1619
+++ b/deps/simdjson/simdjson.h
1720
@@ -4160,12 +4160,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
@@ -51,3 +54,20 @@ index a8bd86b28acc16cb04c193a1afbeb8171b314107..4be1b84b2e4cdc221139b4832e0f7692
5154
#endif // SIMDJSON_PADDED_STRING_INL_H
5255
/* end file simdjson/padded_string-inl.h */
5356
/* skipped duplicate #include "simdjson/padded_string_view.h" */
57+
@@ -56961,12 +56971,16 @@ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::
58+
return parser_instance;
59+
}
60+
61+
+#pragma clang diagnostic push
62+
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
63+
+
64+
simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::get_threadlocal_parser_if_exists() {
65+
// @the-moisrex points out that this could be implemented with std::optional (C++17).
66+
thread_local std::unique_ptr<ondemand::parser> parser_instance = nullptr;
67+
return parser_instance;
68+
}
69+
70+
+#pragma clang diagnostic pop
71+
72+
} // namespace ondemand
73+
} // namespace fallback

0 commit comments

Comments
 (0)