Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: include the libuv and zlib into node #18383

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
},
},
'conditions': [
['OS in "linux freebsd openbsd solaris android"', {
['OS!="aix"', {
'ldflags': [
'-Wl,--whole-archive,<(obj_dir)/<(STATIC_LIB_PREFIX)'
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
Expand Down
62 changes: 60 additions & 2 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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"', {
Expand All @@ -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"', {
Expand Down Expand Up @@ -240,12 +292,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',
],
}],
Expand Down