Skip to content

Commit 3d01b40

Browse files
authored
Add missing deps in MINIMAL_RUNTIME (#11107)
1 parent 5dc3c3e commit 3d01b40

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/library.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,11 @@ LibraryManager.library = {
744744
// to limitations in the system libraries (we can't easily add a global
745745
// ctor to create the environment without it always being linked in with
746746
// libc).
747-
__buildEnvironment__deps: ['$ENV', '_getExecutableName'],
747+
__buildEnvironment__deps: ['$ENV', '_getExecutableName'
748+
#if MINIMAL_RUNTIME
749+
, '$writeAsciiToMemory'
750+
#endif
751+
],
748752
__buildEnvironment: function(environ) {
749753
// WARNING: Arbitrary limit!
750754
var MAX_ENV_VALUES = 64;
@@ -3855,7 +3859,11 @@ LibraryManager.library = {
38553859
// are actually negative numbers and you can't have expressions as keys in JavaScript literals.
38563860
$GAI_ERRNO_MESSAGES: {},
38573861

3858-
gai_strerror__deps: ['$GAI_ERRNO_MESSAGES'],
3862+
gai_strerror__deps: ['$GAI_ERRNO_MESSAGES'
3863+
#if MINIMAL_RUNTIME
3864+
, '$writeAsciiToMemory'
3865+
#endif
3866+
],
38593867
gai_strerror: function(val) {
38603868
var buflen = 256;
38613869

@@ -3897,7 +3905,11 @@ LibraryManager.library = {
38973905
list: [],
38983906
map: {}
38993907
},
3900-
setprotoent__deps: ['$Protocols'],
3908+
setprotoent__deps: ['$Protocols'
3909+
#if MINIMAL_RUNTIME
3910+
, '$writeAsciiToMemory'
3911+
#endif
3912+
],
39013913
setprotoent: function(stayopen) {
39023914
// void setprotoent(int stayopen);
39033915

src/library_wasi.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ var WasiLibrary = {
8484
},
8585

8686
args_get__sig: 'iii',
87+
#if MINIMAL_RUNTIME && MAIN_READS_PARAMS
88+
args_get__deps: ['$writeAsciiToMemory'],
89+
#endif
8790
args_get: function(argv, argv_buf) {
8891
#if MAIN_READS_PARAMS
8992
var bufSize = 0;

0 commit comments

Comments
 (0)