Skip to content

Commit 36ae81a

Browse files
andredcodebytere
authored andcommittedMar 30, 2020
build: allow use of system-installed brotli
brotli is available as a shared library since 2016, so it makes sense to allow its use as a system-installed version. Some of the infrastructure was in place already (node.gyp and node.gypi), but some bits in the configure script here were missing. Add them, keeping the default as before, to use the bundled version. Refs: google/brotli#421 Signed-off-by: André Draszik <git@andred.net> PR-URL: #32046 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 6605bba commit 36ae81a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
 

‎configure.py

+22
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,27 @@
300300
dest='shared_zlib_libpath',
301301
help='a directory to search for the shared zlib DLL')
302302

303+
shared_optgroup.add_option('--shared-brotli',
304+
action='store_true',
305+
dest='shared_brotli',
306+
help='link to a shared brotli DLL instead of static linking')
307+
308+
shared_optgroup.add_option('--shared-brotli-includes',
309+
action='store',
310+
dest='shared_brotli_includes',
311+
help='directory containing brotli header files')
312+
313+
shared_optgroup.add_option('--shared-brotli-libname',
314+
action='store',
315+
dest='shared_brotli_libname',
316+
default='brotlidec,brotlienc',
317+
help='alternative lib name to link to [default: %default]')
318+
319+
shared_optgroup.add_option('--shared-brotli-libpath',
320+
action='store',
321+
dest='shared_brotli_libpath',
322+
help='a directory to search for the shared brotli DLL')
323+
303324
shared_optgroup.add_option('--shared-cares',
304325
action='store_true',
305326
dest='shared_cares',
@@ -1654,6 +1675,7 @@ def make_bin_override():
16541675
configure_library('zlib', output)
16551676
configure_library('http_parser', output)
16561677
configure_library('libuv', output)
1678+
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
16571679
configure_library('cares', output, pkgname='libcares')
16581680
configure_library('nghttp2', output, pkgname='libnghttp2')
16591681
configure_v8(output)

0 commit comments

Comments
 (0)
Please sign in to comment.