Skip to content

Commit

Permalink
Override BUILDING_UV_SHARED, BUILDING_V8_SHARED.
Browse files Browse the repository at this point in the history
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 <bbyholm@abo.fi>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
bnoordhuis committed Jun 16, 2016
1 parent af35b2a commit cc778e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
'<(node_root_dir)/deps/uv/include',
'<(node_root_dir)/deps/v8/include'
],
'defines!': [
'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
],
'defines': [
'NODE_GYP_MODULE_NAME=>(_target_name)',
'USING_UV_SHARED=1',
'USING_V8_SHARED=1',
# Warn when using deprecated V8 APIs.
'V8_DEPRECATION_WARNINGS=1'
],
Expand Down

0 comments on commit cc778e9

Please sign in to comment.