From 56b04ce046924f1196bd64287953f426a4b1b2b2 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 15 Oct 2018 15:15:58 -0700 Subject: [PATCH 1/2] src: use `visibility("default")` for exports on POSIX Electron uses this because Chromium builds with symbols hidden by default. Refs: https://github.com/electron/node/commit/88b494191c2a5b50b01dab80cd61ba3c0e0fbeb9 Refs: https://github.com/electron/node/commit/1293d1d7d0c33d3925da11ceccdce4eb2e927a43 --- src/js_native_api.h | 2 +- src/node.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js_native_api.h b/src/js_native_api.h index acb7316d2d2972..2fe68c696f641b 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -22,7 +22,7 @@ #ifdef _WIN32 #define NAPI_EXTERN __declspec(dllexport) #else - #define NAPI_EXTERN /* nothing */ + #define NODE_EXTERN __attribute__((visibility("default"))) #endif #endif diff --git a/src/node.h b/src/node.h index 72911d7982b72f..c260d172c01ebf 100644 --- a/src/node.h +++ b/src/node.h @@ -29,7 +29,7 @@ # define NODE_EXTERN __declspec(dllimport) # endif #else -# define NODE_EXTERN /* nothing */ +# define NODE_EXTERN __attribute__((visibility("default"))) #endif #ifdef BUILDING_NODE_EXTENSION From 79591b016af7311d8752f1a45ca7db2c7ed578eb Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 2 Feb 2019 17:26:12 +0100 Subject: [PATCH 2/2] fixup! src: use `visibility("default")` for exports on POSIX --- src/js_native_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js_native_api.h b/src/js_native_api.h index 2fe68c696f641b..9d0fa811cfa3af 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -22,7 +22,7 @@ #ifdef _WIN32 #define NAPI_EXTERN __declspec(dllexport) #else - #define NODE_EXTERN __attribute__((visibility("default"))) + #define NAPI_EXTERN __attribute__((visibility("default"))) #endif #endif