Skip to content

Commit cc778e9

Browse files
committed
Override BUILDING_UV_SHARED, BUILDING_V8_SHARED.
We were inheriting BUILDING_UV_SHARED and BUILDING_V8_SHARED from the common.gypi from the node.js source tree. Override them with USING_UV_SHARED and USING_V8_SHARED so symbols get tagged with `__declspec(dllimport)` instead of `__declspec(dllexport)`, which is the desired attribute when building add-ons. Fixes: #914 PR-URL: #915 Reviewed-By: Benjamin Byholm <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
1 parent af35b2a commit cc778e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

addon.gypi

+6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
'<(node_root_dir)/deps/uv/include',
1111
'<(node_root_dir)/deps/v8/include'
1212
],
13+
'defines!': [
14+
'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
15+
'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
16+
],
1317
'defines': [
1418
'NODE_GYP_MODULE_NAME=>(_target_name)',
19+
'USING_UV_SHARED=1',
20+
'USING_V8_SHARED=1',
1521
# Warn when using deprecated V8 APIs.
1622
'V8_DEPRECATION_WARNINGS=1'
1723
],

0 commit comments

Comments
 (0)