From 88cf90f9c4d191e959dde6777ec5cfc574814f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 21 Sep 2022 15:47:37 +0200 Subject: [PATCH] deps: always define V8_EXPORT_PRIVATE as no-op dllexport introduces issues when compiling with MSVC. PR-URL: https://github.com/nodejs/node/pull/47251 Reviewed-By: Yagiz Nizipli Reviewed-By: Jiawen Geng Reviewed-By: Rafael Gonzaga Reviewed-By: Richard Lau PR-URL: https://github.com/nodejs/node/pull/49639 Reviewed-By: Antoine du Hamel --- common.gypi | 2 +- deps/v8/src/base/macros.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index 9533fbc439c49f..923747cbfa7ef8 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.0', + 'v8_embedder_string': '-node.1', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h index f812583633b8d8..92d9af5a090b0b 100644 --- a/deps/v8/src/base/macros.h +++ b/deps/v8/src/base/macros.h @@ -389,9 +389,9 @@ bool is_inbounds(float_t v) { // Setup for Windows shared library export. #define V8_EXPORT_ENUM #ifdef BUILDING_V8_SHARED -#define V8_EXPORT_PRIVATE __declspec(dllexport) +#define V8_EXPORT_PRIVATE #elif USING_V8_SHARED -#define V8_EXPORT_PRIVATE __declspec(dllimport) +#define V8_EXPORT_PRIVATE #else #define V8_EXPORT_PRIVATE #endif // BUILDING_V8_SHARED @@ -401,8 +401,8 @@ bool is_inbounds(float_t v) { // Setup for Linux shared library export. #if V8_HAS_ATTRIBUTE_VISIBILITY #ifdef BUILDING_V8_SHARED -#define V8_EXPORT_PRIVATE __attribute__((visibility("default"))) -#define V8_EXPORT_ENUM V8_EXPORT_PRIVATE +#define V8_EXPORT_PRIVATE +#define V8_EXPORT_ENUM #else #define V8_EXPORT_PRIVATE #define V8_EXPORT_ENUM