Skip to content

Commit 9f36c0d

Browse files
committed
gyp: do not rm unused openssl syms on osx/linux
fix #8026 Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent 38f6fcd commit 9f36c0d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

node.gyp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,19 @@
155155
# For tests
156156
'./deps/openssl/openssl.gyp:openssl-cli',
157157
],
158+
# Do not let unused OpenSSL symbols to slip away
159+
'xcode_settings': {
160+
'OTHER_LDFLAGS': [
161+
'-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
162+
],
163+
},
164+
'conditions': [
165+
['OS=="linux"', {
166+
'ldflags': [
167+
'-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
168+
],
169+
}],
170+
],
158171
}]]
159172
}, {
160173
'defines': [ 'HAVE_OPENSSL=0' ]

0 commit comments

Comments
 (0)