Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable building with shared uvwasi lib #43987

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,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 @@ -1940,6 +1962,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 @@ -18,6 +18,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 @@ -160,7 +161,6 @@

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

'msvs_settings': {
Expand Down Expand Up @@ -452,7 +452,6 @@
'deps/base64/base64.gyp:base64',
'deps/googletest/googletest.gyp:gtest_prod',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],

'sources': [
Expand Down Expand Up @@ -912,8 +911,8 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],

'includes': [
'node.gypi'
],
Expand All @@ -923,9 +922,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 @@ -955,7 +954,6 @@
'deps/googletest/googletest.gyp:gtest',
'deps/googletest/googletest.gyp:gtest_main',
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],

'includes': [
Expand All @@ -968,7 +966,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
'test/cctest',
],

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

'includes': [
Expand All @@ -1063,7 +1059,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'deps/uvwasi/include',
'test/embedding',
],

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

'includes': [
Expand All @@ -1132,7 +1126,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 @@ -196,6 +196,10 @@
],
}],

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

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