Skip to content

Commit eb2402d

Browse files
PoojaDurgadTeutatesaduh95
authored andcommittedSep 21, 2024
build: enable building with shared uvwasi lib
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>
1 parent 9686153 commit eb2402d

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed
 

Diff for: ‎configure.py

+23
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,28 @@
381381
dest='shared_openssl_libpath',
382382
help='a directory to search for the shared OpenSSL DLLs')
383383

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

Diff for: ‎node.gyp

+3-8
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',
@@ -534,7 +535,6 @@
534535

535536
'dependencies': [
536537
'deps/histogram/histogram.gyp:histogram',
537-
'deps/uvwasi/uvwasi.gyp:uvwasi',
538538
],
539539

540540
'msvs_settings': {
@@ -1014,8 +1014,8 @@
10141014
'dependencies': [
10151015
'<(node_lib_target_name)',
10161016
'deps/histogram/histogram.gyp:histogram',
1017-
'deps/uvwasi/uvwasi.gyp:uvwasi',
10181017
],
1018+
10191019
'includes': [
10201020
'node.gypi'
10211021
],
@@ -1025,9 +1025,9 @@
10251025
'deps/v8/include',
10261026
'deps/cares/include',
10271027
'deps/uv/include',
1028-
'deps/uvwasi/include',
10291028
'test/cctest',
10301029
],
1030+
10311031
'defines': [
10321032
'NODE_ARCH="<(target_arch)"',
10331033
'NODE_PLATFORM="<(OS)"',
@@ -1164,7 +1164,6 @@
11641164
'deps/v8/include',
11651165
'deps/cares/include',
11661166
'deps/uv/include',
1167-
'deps/uvwasi/include',
11681167
'test/cctest',
11691168
],
11701169

@@ -1226,7 +1225,6 @@
12261225
'dependencies': [
12271226
'<(node_lib_target_name)',
12281227
'deps/histogram/histogram.gyp:histogram',
1229-
'deps/uvwasi/uvwasi.gyp:uvwasi',
12301228
'deps/ada/ada.gyp:ada',
12311229
],
12321230

@@ -1241,7 +1239,6 @@
12411239
'deps/v8/include',
12421240
'deps/cares/include',
12431241
'deps/uv/include',
1244-
'deps/uvwasi/include',
12451242
'test/embedding',
12461243
],
12471244

@@ -1341,7 +1338,6 @@
13411338
'dependencies': [
13421339
'<(node_lib_target_name)',
13431340
'deps/histogram/histogram.gyp:histogram',
1344-
'deps/uvwasi/uvwasi.gyp:uvwasi',
13451341
'deps/ada/ada.gyp:ada',
13461342
],
13471343

@@ -1355,7 +1351,6 @@
13551351
'deps/v8/include',
13561352
'deps/cares/include',
13571353
'deps/uv/include',
1358-
'deps/uvwasi/include',
13591354
],
13601355

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

Diff for: ‎node.gypi

+4
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@
208208
],
209209
}],
210210

211+
[ 'node_shared_uvwasi=="false"', {
212+
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
213+
}],
214+
211215
[ 'node_shared_nghttp2=="false"', {
212216
'dependencies': [ 'deps/nghttp2/nghttp2.gyp:nghttp2' ],
213217
}],

0 commit comments

Comments
 (0)
Please sign in to comment.