Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 72e2535

Browse filesBrowse files
EdSchoutengibfahn
authored andcommitted
build: Allow linking against an external copy of nghttp2.
The version of nghttp2 in deps/ does not build on CloudABI, even though the official version does. Though this is an issue on its own that needs to be resolved, it is currently a bit hard to work around this. There is no switch to link against an external version of nghttp2, even though we do provide this option for other libraries. This change adds configure flags, similar to the ones we have for OpenSSL, zlib, http_parser, libuv, etc. and makes the dependency on deps/nghttp2 optional. PR-URL: #16788 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 92e0e2e commit 72e2535
Copy full SHA for 72e2535

File tree

Expand file treeCollapse file tree

3 files changed

+36
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+36
-3
lines changed
Open diff view settings
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,27 @@ shared_optgroup.add_option('--shared-libuv-libpath',
214214
dest='shared_libuv_libpath',
215215
help='a directory to search for the shared libuv DLL')
216216

217+
shared_optgroup.add_option('--shared-nghttp2',
218+
action='store_true',
219+
dest='shared_nghttp2',
220+
help='link to a shared nghttp2 DLL instead of static linking')
221+
222+
shared_optgroup.add_option('--shared-nghttp2-includes',
223+
action='store',
224+
dest='shared_nghttp2_includes',
225+
help='directory containing nghttp2 header files')
226+
227+
shared_optgroup.add_option('--shared-nghttp2-libname',
228+
action='store',
229+
dest='shared_nghttp2_libname',
230+
default='nghttp2',
231+
help='alternative lib name to link to [default: %default]')
232+
233+
shared_optgroup.add_option('--shared-nghttp2-libpath',
234+
action='store',
235+
dest='shared_nghttp2_libpath',
236+
help='a directory to search for the shared nghttp2 DLLs')
237+
217238
shared_optgroup.add_option('--shared-openssl',
218239
action='store_true',
219240
dest='shared_openssl',
@@ -1407,6 +1428,7 @@ configure_library('zlib', output)
14071428
configure_library('http_parser', output)
14081429
configure_library('libuv', output)
14091430
configure_library('libcares', output)
1431+
configure_library('nghttp2', output)
14101432
# stay backwards compatible with shared cares builds
14111433
output['variables']['node_shared_cares'] = \
14121434
output['variables'].pop('node_shared_libcares')
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
'node_shared_http_parser%': 'false',
1717
'node_shared_cares%': 'false',
1818
'node_shared_libuv%': 'false',
19+
'node_shared_nghttp2%': 'false',
1920
'node_use_openssl%': 'true',
2021
'node_shared_openssl%': 'false',
2122
'node_v8_options%': '',
@@ -162,7 +163,6 @@
162163

163164
'dependencies': [
164165
'node_js2c#host',
165-
'deps/nghttp2/nghttp2.gyp:nghttp2'
166166
],
167167

168168
'includes': [
@@ -172,8 +172,7 @@
172172
'include_dirs': [
173173
'src',
174174
'tools/msvs/genfiles',
175-
'<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
176-
'deps/nghttp2/lib/includes'
175+
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
177176
],
178177

179178
'sources': [
@@ -906,6 +905,14 @@
906905
'deps/uv/uv.gyp:libuv'
907906
]
908907
}],
908+
[ 'node_shared_nghttp2=="false"', {
909+
'dependencies': [
910+
'deps/nghttp2/nghttp2.gyp:nghttp2'
911+
],
912+
'include_dirs': [
913+
'deps/nghttp2/lib/includes'
914+
]
915+
}],
909916
[ 'node_use_v8_platform=="true"', {
910917
'dependencies': [
911918
'deps/v8/src/v8.gyp:v8_libplatform',
Collapse file

‎node.gypi‎

Copy file name to clipboardExpand all lines: node.gypi
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
139139
}],
140140

141+
[ 'node_shared_nghttp2=="false"', {
142+
'dependencies': [ 'deps/nghttp2/nghttp2.gyp:nghttp2' ],
143+
}],
144+
141145
[ 'OS=="mac"', {
142146
# linking Corefoundation is needed since certain OSX debugging tools
143147
# like Instruments require it for some features

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.