From 9f36c0d235f4eb7e6528face49c15045a5e41e14 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 30 Jul 2014 14:54:36 +0400 Subject: [PATCH] gyp: do not rm unused openssl syms on osx/linux fix #8026 Reviewed-By: Fedor Indutny --- node.gyp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/node.gyp b/node.gyp index 348040e03d..33c4f0e0bb 100644 --- a/node.gyp +++ b/node.gyp @@ -155,6 +155,19 @@ # For tests './deps/openssl/openssl.gyp:openssl-cli', ], + # Do not let unused OpenSSL symbols to slip away + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a', + ], + }, + 'conditions': [ + ['OS=="linux"', { + 'ldflags': [ + '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive', + ], + }], + ], }]] }, { 'defines': [ 'HAVE_OPENSSL=0' ]