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

http2: Allow using a shared nghttp2 library #15256

Closed
wants to merge 2 commits 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
22 changes: 22 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,27 @@ shared_optgroup.add_option('--shared-http-parser-libpath',
dest='shared_http_parser_libpath',
help='a directory to search for the shared http_parser DLL')

shared_optgroup.add_option('--shared-nghttp2',
action='store_true',
dest='shared_nghttp2',
help='link to a shared nghttp2 DLL instead of static linking')

shared_optgroup.add_option('--shared-nghttp2-includes',
action='store',
dest='shared_nghttp2_includes',
help='directory containing nghttp2 header files')

shared_optgroup.add_option('--shared-nghttp2-libname',
action='store',
dest='shared_nghttp2_libname',
default='nghttp2',
help='alternative lib name to link to [default: %default]')

shared_optgroup.add_option('--shared-nghttp2-libpath',
action='store',
dest='shared_nghttp2_libpath',
help='a directory to search for the shared nghttp2 DLL')

shared_optgroup.add_option('--shared-libuv',
action='store_true',
dest='shared_libuv',
Expand Down Expand Up @@ -1371,6 +1392,7 @@ flavor = GetFlavor(flavor_params)
configure_node(output)
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('nghttp2', output)
configure_library('libuv', output)
configure_library('libcares', output)
# stay backwards compatible with shared cares builds
Expand Down
18 changes: 13 additions & 5 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'node_module_version%': '',
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
'node_shared_nghttp2%': 'false',
'node_shared_cares%': 'false',
'node_shared_libuv%': 'false',
'node_use_openssl%': 'true',
Expand Down Expand Up @@ -168,8 +169,7 @@
'type': '<(node_target_type)',

'dependencies': [
'node_js2c#host',
'deps/nghttp2/nghttp2.gyp:nghttp2'
'node_js2c#host'
],

'includes': [
Expand All @@ -180,8 +180,7 @@
'src',
'tools/msvs/genfiles',
'deps/uv/src/ares',
'<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
'deps/nghttp2/lib/includes'
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
],

'sources': [
Expand Down Expand Up @@ -300,7 +299,7 @@
'NODE_PLATFORM="<(OS)"',
'NODE_WANT_INTERNALS=1',
# Warn when using deprecated V8 APIs.
'V8_DEPRECATION_WARNINGS=1',
'V8_DEPRECATION_WARNINGS=1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you undo this change?

],
},
{
Expand Down Expand Up @@ -715,6 +714,15 @@
'deps/http_parser/http_parser.gyp:http_parser'
]
}],
[ 'node_shared_nghttp2=="false"', {
'dependencies': [
'deps/nghttp2/nghttp2.gyp:nghttp2'
],
'defines': [
# We're using the nghttp2 static lib
'NGHTTP2_STATICLIB'
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the define? That's taken care of now that #15487 has been merged.

}],
[ 'node_shared_libuv=="false"', {
'dependencies': [
'deps/uv/uv.gyp:libuv'
Expand Down
4 changes: 4 additions & 0 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@
'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
}],

[ 'node_shared_nghttp2=="false"', {
'dependencies': [ 'deps/nghttp2/nghttp2.gyp:nghttp2' ],
}],

[ 'node_shared_cares=="false"', {
'dependencies': [ 'deps/cares/cares.gyp:cares' ],
}],
Expand Down