Skip to content

Commit

Permalink
build: enable building with shared uvwasi lib
Browse files Browse the repository at this point in the history
Fixes: #35339
Co-authored-by: Pooja D P <Pooja.D.P@ibm.com>
Co-authored-by: Teutates <103068388+Teutates@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #43987
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
3 people authored and targos committed May 12, 2024
1 parent 80fa675 commit f96466a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
23 changes: 23 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,28 @@
dest='shared_openssl_libpath',
help='a directory to search for the shared OpenSSL DLLs')

shared_optgroup.add_argument('--shared-uvwasi',
action='store_true',
dest='shared_uvwasi',
default=None,
help='link to a shared uvwasi DLL instead of static linking')

shared_optgroup.add_argument('--shared-uvwasi-includes',
action='store',
dest='shared_uvwasi_includes',
help='directory containing uvwasi header files')

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

shared_optgroup.add_argument('--shared-uvwasi-libpath',
action='store',
dest='shared_uvwasi_libpath',
help='a directory to search for the shared uvwasi DLL')

shared_optgroup.add_argument('--shared-zlib',
action='store_true',
dest='shared_zlib',
Expand Down Expand Up @@ -2122,6 +2144,7 @@ def make_bin_override():
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_library('nghttp3', output, pkgname='libnghttp3')
configure_library('ngtcp2', output, pkgname='libngtcp2')
configure_library('uvwasi', output, pkgname='libuvwasi')
configure_v8(output)
configure_openssl(output)
configure_intl(output)
Expand Down
13 changes: 3 additions & 10 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'node_shared_http_parser%': 'false',
'node_shared_cares%': 'false',
'node_shared_libuv%': 'false',
'node_shared_uvwasi%': 'false',
'node_shared_nghttp2%': 'false',
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
Expand Down Expand Up @@ -550,7 +551,6 @@

'dependencies': [
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],

'msvs_settings': {
Expand Down Expand Up @@ -845,7 +845,6 @@
'dependencies': [
'deps/googletest/googletest.gyp:gtest_prod',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdjson/simdjson.gyp:simdjson',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
Expand Down Expand Up @@ -1031,8 +1030,8 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],

'includes': [
'node.gypi'
],
Expand All @@ -1042,9 +1041,9 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
'test/cctest',
],

'defines': [
'NODE_ARCH="<(target_arch)"',
'NODE_PLATFORM="<(OS)"',
Expand Down Expand Up @@ -1077,7 +1076,6 @@
'deps/googletest/googletest.gyp:gtest',
'deps/googletest/googletest.gyp:gtest_main',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdjson/simdjson.gyp:simdjson',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
Expand All @@ -1093,7 +1091,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
'test/cctest',
],

Expand Down Expand Up @@ -1155,7 +1152,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/ada/ada.gyp:ada',
],

Expand All @@ -1169,7 +1165,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
'test/embedding',
],

Expand Down Expand Up @@ -1269,7 +1264,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/ada/ada.gyp:ada',
'deps/simdjson/simdjson.gyp:simdjson',
'deps/simdutf/simdutf.gyp:simdutf',
Expand All @@ -1285,7 +1279,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
],

'defines': [ 'NODE_WANT_INTERNALS=1' ],
Expand Down
4 changes: 4 additions & 0 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@
],
}],

[ 'node_shared_uvwasi=="false"', {
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
}],

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

0 comments on commit f96466a

Please sign in to comment.