From f2430a186b522a8e1850427c54cc9dafeab0156e Mon Sep 17 00:00:00 2001 From: Stefan Stojanovic Date: Mon, 16 Dec 2024 11:11:22 +0100 Subject: [PATCH] deps: define V8_PRESERVE_MOST as no-op on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's causing linker errors with node.lib in node-gyp and potentially breaks other 3rd party tools PR-URL: https://github.com/nodejs/node/pull/56238 Refs: https://github.com/nodejs/node/pull/55784 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca PR-URL: https://github.com/nodejs/node/pull/55014 Reviewed-By: Matteo Collina --- common.gypi | 2 +- deps/v8/include/v8config.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 72d75392162..573fe25796d 100644 --- a/common.gypi +++ b/common.gypi @@ -37,7 +37,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.6', + 'v8_embedder_string': '-node.7', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index bd6b8f0fb50..1084bc9a081 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -591,11 +591,15 @@ path. Add it with -I to the command line // functions. // Use like: // V8_NOINLINE V8_PRESERVE_MOST void UnlikelyMethod(); +#if V8_OS_WIN +# 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.