nodejs_24: patch to fix build on 32-bit targets

Originally by @Valodim at https://github.com/heylogin/nodejs-mobile/commit/79cb3ea1f8fb2ca2b1d4cbd719d5e6c61c499cff
This commit is contained in:
K900
2025-12-17 22:43:38 +03:00
parent 718c175329
commit 4abc140582
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,26 @@
diff --git a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
index ee6fe95a603..58d091a0dc7 100644
--- a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
+++ b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
@@ -637,7 +637,9 @@ class Int64LoweringReducer : public Next {
result = __ Word32CountLeadingZeros(high);
}
- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
+ // patched for arm build. see https://github.com/nodejs/node/issues/58458
+ V<Word32> result_ = result;
+ return __ Tuple(result_, __ Word32Constant(0));
}
V<Word32Pair> LowerCtz(V<Word32Pair> input) {
@@ -650,7 +652,9 @@ class Int64LoweringReducer : public Next {
result = __ Word32CountTrailingZeros(low);
}
- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
+ // patched for arm build. see https://github.com/nodejs/node/issues/58458
+ V<Word32> result_ = result;
+ return __ Tuple(result_, __ Word32Constant(0));
}
V<Word32Pair> LowerPopCount(V<Word32Pair> input) {
+4
View File
@@ -67,5 +67,9 @@ buildNodejs {
hash = "sha256-BBBShQwU20TSY8GtPehQ9i3AH4ZKUGIr8O0bRsgrpNo=";
revert = true;
})
]
++ lib.optionals stdenv.is32bit [
# see: https://github.com/nodejs/node/issues/58458
./v24-32bit.patch
];
}