Skip to content

Commit

Permalink
build: allow use of system-installed brotli
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
andred authored and MylesBorins committed Mar 9, 2020
1 parent f07d423 commit 6413524
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,27 @@
dest='shared_zlib_libpath',
help='a directory to search for the shared zlib DLL')

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

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

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

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

shared_optgroup.add_option('--shared-cares',
action='store_true',
dest='shared_cares',
Expand Down Expand Up @@ -1692,6 +1713,7 @@ def make_bin_override():
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('libuv', output)
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
configure_library('cares', output, pkgname='libcares')
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_v8(output)
Expand Down

0 comments on commit 6413524

Please sign in to comment.