Skip to content

Commit 6413524

Browse files
andredMylesBorins
authored andcommitted
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 <[email protected]> PR-URL: #32046 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent f07d423 commit 6413524

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

configure.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,27 @@
301301
dest='shared_zlib_libpath',
302302
help='a directory to search for the shared zlib DLL')
303303

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

0 commit comments

Comments
 (0)