Skip to content

Commit 24fa553

Browse files
PoojaDurgadTeutatesaduh95
authored andcommitted
build: enable building with shared uvwasi lib
Fixes: nodejs#35339 Co-authored-by: Pooja D P <[email protected]> Co-authored-by: Teutates <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#43987 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4b68ad0 commit 24fa553

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

configure.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,28 @@
382382
dest='shared_openssl_libpath',
383383
help='a directory to search for the shared OpenSSL DLLs')
384384

385+
shared_optgroup.add_argument('--shared-uvwasi',
386+
action='store_true',
387+
dest='shared_uvwasi',
388+
default=None,
389+
help='link to a shared uvwasi DLL instead of static linking')
390+
391+
shared_optgroup.add_argument('--shared-uvwasi-includes',
392+
action='store',
393+
dest='shared_uvwasi_includes',
394+
help='directory containing uvwasi header files')
395+
396+
shared_optgroup.add_argument('--shared-uvwasi-libname',
397+
action='store',
398+
dest='shared_uvwasi_libname',
399+
default='uvwasi',
400+
help='alternative lib name to link to [default: %default]')
401+
402+
shared_optgroup.add_argument('--shared-uvwasi-libpath',
403+
action='store',
404+
dest='shared_uvwasi_libpath',
405+
help='a directory to search for the shared uvwasi DLL')
406+
385407
shared_optgroup.add_argument('--shared-zlib',
386408
action='store_true',
387409
dest='shared_zlib',
@@ -2122,6 +2144,7 @@ def make_bin_override():
21222144
configure_library('nghttp2', output, pkgname='libnghttp2')
21232145
configure_library('nghttp3', output, pkgname='libnghttp3')
21242146
configure_library('ngtcp2', output, pkgname='libngtcp2')
2147+
configure_library('uvwasi', output, pkgname='libuvwasi')
21252148
configure_v8(output)
21262149
configure_openssl(output)
21272150
configure_intl(output)

node.gyp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'node_shared_http_parser%': 'false',
2020
'node_shared_cares%': 'false',
2121
'node_shared_libuv%': 'false',
22+
'node_shared_uvwasi%': 'false',
2223
'node_shared_nghttp2%': 'false',
2324
'node_use_openssl%': 'true',
2425
'node_shared_openssl%': 'false',
@@ -550,7 +551,6 @@
550551

551552
'dependencies': [
552553
'deps/histogram/histogram.gyp:histogram',
553-
'deps/uvwasi/uvwasi.gyp:uvwasi',
554554
],
555555

556556
'msvs_settings': {
@@ -845,7 +845,6 @@
845845
'dependencies': [
846846
'deps/googletest/googletest.gyp:gtest_prod',
847847
'deps/histogram/histogram.gyp:histogram',
848-
'deps/uvwasi/uvwasi.gyp:uvwasi',
849848
'deps/simdjson/simdjson.gyp:simdjson',
850849
'deps/simdutf/simdutf.gyp:simdutf',
851850
'deps/ada/ada.gyp:ada',
@@ -1030,8 +1029,8 @@
10301029
'dependencies': [
10311030
'<(node_lib_target_name)',
10321031
'deps/histogram/histogram.gyp:histogram',
1033-
'deps/uvwasi/uvwasi.gyp:uvwasi',
10341032
],
1033+
10351034
'includes': [
10361035
'node.gypi'
10371036
],
@@ -1041,9 +1040,9 @@
10411040
'deps/v8/include',
10421041
'deps/cares/include',
10431042
'deps/uv/include',
1044-
'deps/uvwasi/include',
10451043
'test/cctest',
10461044
],
1045+
10471046
'defines': [
10481047
'NODE_ARCH="<(target_arch)"',
10491048
'NODE_PLATFORM="<(OS)"',
@@ -1076,7 +1075,6 @@
10761075
'deps/googletest/googletest.gyp:gtest',
10771076
'deps/googletest/googletest.gyp:gtest_main',
10781077
'deps/histogram/histogram.gyp:histogram',
1079-
'deps/uvwasi/uvwasi.gyp:uvwasi',
10801078
'deps/simdjson/simdjson.gyp:simdjson',
10811079
'deps/simdutf/simdutf.gyp:simdutf',
10821080
'deps/ada/ada.gyp:ada',
@@ -1092,7 +1090,6 @@
10921090
'deps/v8/include',
10931091
'deps/cares/include',
10941092
'deps/uv/include',
1095-
'deps/uvwasi/include',
10961093
'test/cctest',
10971094
],
10981095

@@ -1154,7 +1151,6 @@
11541151
'dependencies': [
11551152
'<(node_lib_target_name)',
11561153
'deps/histogram/histogram.gyp:histogram',
1157-
'deps/uvwasi/uvwasi.gyp:uvwasi',
11581154
'deps/ada/ada.gyp:ada',
11591155
],
11601156

@@ -1168,7 +1164,6 @@
11681164
'deps/v8/include',
11691165
'deps/cares/include',
11701166
'deps/uv/include',
1171-
'deps/uvwasi/include',
11721167
'test/embedding',
11731168
],
11741169

@@ -1268,7 +1263,6 @@
12681263
'dependencies': [
12691264
'<(node_lib_target_name)',
12701265
'deps/histogram/histogram.gyp:histogram',
1271-
'deps/uvwasi/uvwasi.gyp:uvwasi',
12721266
'deps/ada/ada.gyp:ada',
12731267
'deps/simdjson/simdjson.gyp:simdjson',
12741268
'deps/simdutf/simdutf.gyp:simdutf',
@@ -1284,7 +1278,6 @@
12841278
'deps/v8/include',
12851279
'deps/cares/include',
12861280
'deps/uv/include',
1287-
'deps/uvwasi/include',
12881281
],
12891282

12901283
'defines': [ 'NODE_WANT_INTERNALS=1' ],

node.gypi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@
204204
],
205205
}],
206206

207+
[ 'node_shared_uvwasi=="false"', {
208+
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
209+
}],
210+
207211
[ 'node_shared_nghttp2=="false"', {
208212
'dependencies': [ 'deps/nghttp2/nghttp2.gyp:nghttp2' ],
209213
}],

0 commit comments

Comments
 (0)