build: set V8_DISABLE_PRESERVE_MOST

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>
This commit is contained in:
Joyee Cheung authored and Antoine du Hamel committed 2026-11-11 17:20:26 +01:00
1 parent 0c0d3ee663
commit 0e1891a0e2
1 file changed
+7
+7
View File
@@ -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 <windows.h> from defining macros that conflict with
# std::min() and std::max(). We don't use <windows.h> (much)
# but we still inherit it from uv.h.