Commit 66f9d2e907f for nodejs
commit 66f9d2e907f0b771dc042aa81ef6509670eef079
Author: Joyee Cheung <joyeec9h3@gmail.com>
Date: Wed Oct 7 23:48:40 2026 +0200
deps: V8: cherry-pick e10d795bfe95
Original commit message:
Do not use preserve_most when targeting the MSVC ABI
In the Microsoft C++ ABI, because preserve_most changes the calling
convention, clang mangles it with U while cdecl gets an A, which
means components compiled with different toolchains can fail to link.
Make it a no-op when targetting MSVC and its ABI.
Co-Authored-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Refs: https://github.com/nodejs/node/pull/55784
Refs: https://github.com/v8/v8/commit/e10d795bfe95106dae986f0b1eafa4ef3cc6eddb
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66601
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
diff --git a/common.gypi b/common.gypi
index 07137b628a1..6855ae18c52 100644
--- a/common.gypi
+++ b/common.gypi
@@ -44,7 +44,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.3',
+ 'v8_embedder_string': '-node.4',
##### V8 defaults for Node.js #####
diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h
index b7aeeade6b8..79bb264d2c9 100644
--- a/deps/v8/include/v8config.h
+++ b/deps/v8/include/v8config.h
@@ -609,11 +609,15 @@ path. Add it with -I<path> to the command line
// functions.
// Use like:
// V8_NOINLINE V8_PRESERVE_MOST void UnlikelyMethod();
+#if V8_CC_MSVC
+# define V8_PRESERVE_MOST
+#else
#if V8_HAS_ATTRIBUTE_PRESERVE_MOST
# define V8_PRESERVE_MOST __attribute__((preserve_most))
#else
# define V8_PRESERVE_MOST /* NOT SUPPORTED */
#endif
+#endif
// A macro (V8_DEPRECATED) to mark classes or functions as deprecated.