Commit 3b5e0d1588c for nodejs

commit 3b5e0d1588c9f406e56f49fb4acbf679172115fd
Author: Joyee Cheung <joyeec9h3@gmail.com>
Date:   Thu Oct 29 12:58:56 2026 +0100

    deps: V8: cherry-pick c38986131c02

    Original commit message:

        Add V8_DISABLE_PRESERVE_MOST for embedders to opt out of preserve_most

        preserve_most changes the calling convention, which clang
        encodes in the mangled name (e.g. "U" instead of "A" for cdecl in the
        Microsoft C++ ABI). A consumer whose toolchain does not support
        the attribute would reference a differently mangled symbol.
        This patch adds a V8_DISABLE_PRESERVE_MOST to disable it, so that
        it's possible to link to V8 using different toolchains, as long
        as the value of it is set consistently.

        Refs: https://github.com/nodejs/node/pull/55784

        Change-Id: I67b49e739942d4026ac060be35bb39ec22256cbd
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8532546
        Commit-Queue: Joyee Cheung <joyee@igalia.com>
        Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#111381}

    Refs: https://github.com/v8/v8/commit/c38986131c02b6f24eb31d99d76ebf312a2b99aa
    Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8532546
    Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
    PR-URL: https://github.com/nodejs/node/pull/67093
    Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
    Reviewed-By: Richard Lau <richard.lau@ibm.com>

diff --git a/common.gypi b/common.gypi
index a8dbd9ba13e..5e100167a42 100644
--- a/common.gypi
+++ b/common.gypi
@@ -50,7 +50,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.10',
+    'v8_embedder_string': '-node.11',

     ##### V8 defaults for Node.js #####

diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h
index 79bb264d2c9..3063b20885c 100644
--- a/deps/v8/include/v8config.h
+++ b/deps/v8/include/v8config.h
@@ -402,6 +402,7 @@ path. Add it with -I<path> to the command line
      || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */    \
          && !defined(_WIN32)))                         /* not on windows */    \
      && !defined(COMPONENT_BUILD)                      /* no component build */\
+     && !defined(V8_DISABLE_PRESERVE_MOST)             /* embedder opt-out */  \
      && __clang_major__ >= 17                          /* clang >= 17 */
 # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
 #endif
@@ -609,15 +610,11 @@ 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.