summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-04-18 16:10:20 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2016-07-05 16:09:58 +0200
commitb4d4fd939c813177209fc6a2f32a3a125122de7c (patch)
tree3edba86358a151f285565ccdad1cb6683c4c55c5 /node.gyp
parentd80432db76b2e019a9403e5318bf6adc9a027ddb (diff)
downloadandroid-node-v8-b4d4fd939c813177209fc6a2f32a3a125122de7c.tar.gz
android-node-v8-b4d4fd939c813177209fc6a2f32a3a125122de7c.tar.bz2
android-node-v8-b4d4fd939c813177209fc6a2f32a3a125122de7c.zip
build: export openssl symbols on windows
Export symbols from the bundled openssl for add-ons to link against. Fixes: https://github.com/nodejs/node-v0.x-archive/issues/4051 PR-URL: https://github.com/nodejs/node/pull/6274 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp56
1 files changed, 56 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 8c9f9c6984..a1a5284292 100644
--- a/node.gyp
+++ b/node.gyp
@@ -109,6 +109,13 @@
}, {
'node_target_type%': 'executable',
}],
+ [ 'OS=="win" and '
+ 'node_use_openssl=="true" and '
+ 'node_shared_openssl=="false"', {
+ 'use_openssl_def': 1,
+ }, {
+ 'use_openssl_def': 0,
+ }],
],
},
@@ -354,6 +361,9 @@
'-Wl,--no-whole-archive',
],
}],
+ ['use_openssl_def==1', {
+ 'sources': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
+ }],
],
}],
],
@@ -530,6 +540,52 @@
}],
],
},
+ {
+ 'target_name': 'mkssldef',
+ 'type': 'none',
+ # TODO(bnoordhuis) Make all platforms export the same list of symbols.
+ # Teach mkssldef.py to generate linker maps that UNIX linkers understand.
+ 'conditions': [
+ [ 'use_openssl_def==1', {
+ 'variables': {
+ 'mkssldef_flags': [
+ # Categories to export.
+ '-CAES,BF,BIO,DES,DH,DSA,EC,ECDH,ECDSA,ENGINE,EVP,HMAC,MD4,MD5,'
+ 'NEXTPROTONEG,PSK,RC2,RC4,RSA,SHA,SHA0,SHA1,SHA256,SHA512,TLSEXT',
+ # Defines.
+ '-DWIN32',
+ # Symbols to filter from the export list.
+ '-X^DSO',
+ '-X^_',
+ '-X^private_',
+ ],
+ },
+ 'conditions': [
+ ['openssl_fips!=""', {
+ 'variables': { 'mkssldef_flags': ['-DOPENSSL_FIPS'] },
+ }],
+ ],
+ 'actions': [
+ {
+ 'action_name': 'mkssldef',
+ 'inputs': [
+ 'deps/openssl/openssl/util/libeay.num',
+ 'deps/openssl/openssl/util/ssleay.num',
+ ],
+ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
+ 'action': [
+ 'python',
+ 'tools/mkssldef.py',
+ '<@(mkssldef_flags)',
+ '-o',
+ '<@(_outputs)',
+ '<@(_inputs)',
+ ],
+ },
+ ],
+ }],
+ ],
+ },
# generate ETW header and resource files
{
'target_name': 'node_etw',