Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYihong Wang <yh.wang@ibm.com>2018-01-18 00:16:14 +0300
committerAnna Henningsen <anna@addaleax.net>2018-02-04 18:44:46 +0300
commitd161625c004827a4c09c560a193bcd499a68a28a (patch)
tree26db5ffcc60cdb1f4a46f69a99206f2cb62d3907 /node.gypi
parent6f8de31cde682f9d90455433e8ee72fffa27a101 (diff)
build: include the libuv and zlib into node
Add libuv and zlib into node executable and shared lib. Also fix an issue that openssl is not fully included in node executable for macOS. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Fixes: https://github.com/nodejs/node/issues/17444 PR-URL: https://github.com/nodejs/node/pull/18383 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'node.gypi')
-rw-r--r--node.gypi62
1 files changed, 60 insertions, 2 deletions
diff --git a/node.gypi b/node.gypi
index d01004ce8cc..852cc18eee7 100644
--- a/node.gypi
+++ b/node.gypi
@@ -107,6 +107,32 @@
}],
[ 'node_shared_zlib=="false"', {
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
+ 'conditions': [
+ [ 'force_load=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
+ 'zlib<(STATIC_LIB_SUFFIX)',
+ ],
+ },
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalOptions': [
+ '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\zlib<(STATIC_LIB_SUFFIX)',
+ ],
+ },
+ },
+ 'conditions': [
+ ['OS!="aix" and node_shared=="false"', {
+ 'ldflags': [
+ '-Wl,--whole-archive,<(obj_dir)/deps/zlib/<(STATIC_LIB_PREFIX)'
+ 'zlib<(STATIC_LIB_SUFFIX)',
+ '-Wl,--no-whole-archive',
+ ],
+ }],
+ ],
+ }],
+ ],
}],
[ 'node_shared_http_parser=="false"', {
@@ -119,6 +145,32 @@
[ 'node_shared_libuv=="false"', {
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
+ 'conditions': [
+ [ 'force_load=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
+ 'uv<(STATIC_LIB_SUFFIX)',
+ ],
+ },
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalOptions': [
+ '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libuv<(STATIC_LIB_SUFFIX)',
+ ],
+ },
+ },
+ 'conditions': [
+ ['OS!="aix" and node_shared=="false"', {
+ 'ldflags': [
+ '-Wl,--whole-archive,<(obj_dir)/deps/uv/<(STATIC_LIB_PREFIX)'
+ 'uv<(STATIC_LIB_SUFFIX)',
+ '-Wl,--no-whole-archive',
+ ],
+ }],
+ ],
+ }],
+ ],
}],
[ 'node_shared_nghttp2=="false"', {
@@ -235,12 +287,18 @@
'-Wl,-force_load,<(PRODUCT_DIR)/<(openssl_product)',
],
},
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalOptions': [
+ '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\<(openssl_product)',
+ ],
+ },
+ },
'conditions': [
['OS in "linux freebsd" and node_shared=="false"', {
'ldflags': [
'-Wl,--whole-archive,'
- '<(obj_dir)/deps/openssl/'
- '<(openssl_product)',
+ '<(obj_dir)/deps/openssl/<(openssl_product)',
'-Wl,--no-whole-archive',
],
}],