From 0e1891a0e20fb1982c4fc246e2df811a9b30f604 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 28 Oct 2026 20:43:30 +0100 Subject: [PATCH] build: set V8_DISABLE_PRESERVE_MOST Refs: https://chromium-review.googlesource.com/c/v8/v8/+/8532546 Signed-off-by: Joyee Cheung PR-URL: https://github.com/nodejs/node/pull/67093 Reviewed-By: Chengzhong Wu Reviewed-By: Richard Lau --- common.gypi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common.gypi b/common.gypi index 5e100167a42..f8588b82311 100644 --- a/common.gypi +++ b/common.gypi @@ -588,6 +588,13 @@ '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', 'BUILDING_UV_SHARED=1', + # Node.js is built with clang-cl but native addons may be built + # with MSVC, which does not support preserve_most. + # As preserve_most changes the mangled name of a function in the + # Microsoft C++ ABI, the addons would fail to link against the + # exported symbols. So this define must be consistely set for + # both the V8 build and addon builds. + 'V8_DISABLE_PRESERVE_MOST', # Stop from defining macros that conflict with # std::min() and std::max(). We don't use (much) # but we still inherit it from uv.h.