gyp: do not rm unused openssl syms on osx/linux
authorFedor Indutny <fedor@indutny.com>
Wed, 30 Jul 2014 10:54:36 +0000 (14:54 +0400)
committerFedor Indutny <fedor@indutny.com>
Thu, 31 Jul 2014 07:52:01 +0000 (11:52 +0400)
fix #8026

Reviewed-By: Fedor Indutny <fedor@indutny.com>
node.gyp

index 348040e..33c4f0e 100644 (file)
--- a/node.gyp
+++ b/node.gyp
                 # 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' ]