summaryrefslogtreecommitdiff
path: root/common.gypi
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-09-25 17:35:07 +0200
committerMichaël Zasso <targos@protonmail.com>2022-10-11 07:26:51 +0200
commit26c651c34e65558bbfb850a1a1b7f2e922dcbea9 (patch)
treeade2659e0f81fb4e7ceaa4a0f36f084fc3bf8776 /common.gypi
parentc8ff2dfd1137acbc2defaea3d6d93df3cb7b0823 (diff)
downloadnode-new-26c651c34e65558bbfb850a1a1b7f2e922dcbea9.tar.gz
deps: V8: cherry-pick 1b3a4f0c34a1
Original commit message: [msvc] fix build with neon intrinsics This compilation error was found by NodeJS when updating V8: https://github.com/nodejs/node-v8/issues/240 MSVC reports an error with "too many initializer" for type uint32x4_t. --- Under gcc/clang, this is a typedef to a builtin type. For MSVC, it is a typedef to this union: typedef union __n128 { unsigned __int64 n128_u64[2]; unsigned __int32 n128_u32[4]; ... } __n128; C++ mandates that only first member of union can be initialized at declaration. Thus, it can only be initialized with {uint64_t, uint64_t}. VS people proposed to use designated initializer instead: var = {.n128_u32={1, 2, 3, 8}} https://developercommunity.visualstudio.com/t/error-c2078-too-many-initializers-when-using-arm-n/402911 But, you need to use /std:c++20 for this, which is not the case in v8. --- Thus, the only solution is to implement a hack specifically for MSVC, where you build two uint64, from four uint32. --------------------------------------- Once solved, another error is reported: templated function extract_first_nonzero_index is specialized twice. This is because, with MSVC, uint32x4_t and uint64x2_t are typedef to the same __n128 union. The fix is to drop templates, and use explicit function names instead. Bug: v8:13312 Change-Id: I231d8cf01c05af01af319d56d5666c415f8b989b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913035 Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#83404} Refs: https://github.com/v8/v8/commit/1b3a4f0c34a19ea82958823c400068a7dbc63675 PR-URL: https://github.com/nodejs/node/pull/44741 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'common.gypi')
-rw-r--r--common.gypi2
1 files changed, 1 insertions, 1 deletions
diff --git a/common.gypi b/common.gypi
index af5098d898..05b7429103 100644
--- a/common.gypi
+++ b/common.gypi
@@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
- 'v8_embedder_string': '-node.8',
+ 'v8_embedder_string': '-node.9',
##### V8 defaults for Node.js #####