Skip to content

Commit 2e80b91

Browse files
nornagonaddaleax
authored andcommitted
src: use visibility("default") exports on POSIX
Electron uses this because Chromium builds with symbols hidden by default. Refs:https://github.com/electron/node/commit/ 88b4941 Refs: https://github.com/electron/node/commit/ 1293d1d7d0c33d3925da11ceccdce4eb2e927a43 PR-URL: #25893 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
1 parent cc4ae20 commit 2e80b91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/js_native_api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifdef _WIN32
2323
#define NAPI_EXTERN __declspec(dllexport)
2424
#else
25-
#define NAPI_EXTERN /* nothing */
25+
#define NAPI_EXTERN __attribute__((visibility("default")))
2626
#endif
2727
#endif
2828

src/node.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# define NODE_EXTERN __declspec(dllimport)
3030
# endif
3131
#else
32-
# define NODE_EXTERN /* nothing */
32+
# define NODE_EXTERN __attribute__((visibility("default")))
3333
#endif
3434

3535
#ifdef BUILDING_NODE_EXTENSION

0 commit comments

Comments
 (0)