diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-13 20:21:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-13 20:21:10 -0700 |
commit | ae7378a008fd3b6e9a7cd46a9a33aba3ffd61eb1 (patch) | |
tree | 23c5f4897c44466793985c50a02dadd35a900cf9 /src | |
parent | 86c385d577c9615147c2f9ef051da0c5c2c77b7d (diff) |
warn on missing library deps, remove an obsolete VFS dep, and add a necessary glOrtho dep; fixes #1708
Diffstat (limited to 'src')
-rw-r--r-- | src/jsifier.js | 3 | ||||
-rw-r--r-- | src/library_fs.js | 2 | ||||
-rw-r--r-- | src/library_gl.js | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index a126994b..20d1ea3b 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -407,6 +407,9 @@ function JSify(data, functionsOnly, givenFunctions) { var snippet = LibraryManager.library[ident]; var redirectedIdent = null; var deps = LibraryManager.library[ident + '__deps'] || []; + deps.forEach(function(dep) { + if (!(dep in LibraryManager.library)) warn('missing library dependency ' + dep + ', make sure you are compiling with the right options (see #ifdefs in src/library*.js)'); + }); var isFunction = false; if (typeof snippet === 'string') { diff --git a/src/library_fs.js b/src/library_fs.js index 5adbe6b7..da1a4e7f 100644 --- a/src/library_fs.js +++ b/src/library_fs.js @@ -1,5 +1,5 @@ mergeInto(LibraryManager.library, { - $FS__deps: ['$ERRNO_CODES', '$ERRNO_MESSAGES', '__setErrNo', '$VFS', '$PATH', '$TTY', '$MEMFS', '$IDBFS', '$NODEFS', 'stdin', 'stdout', 'stderr', 'fflush'], + $FS__deps: ['$ERRNO_CODES', '$ERRNO_MESSAGES', '__setErrNo', '$PATH', '$TTY', '$MEMFS', '$IDBFS', '$NODEFS', 'stdin', 'stdout', 'stderr', 'fflush'], $FS__postset: 'FS.staticInit();' + '__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });' + '__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });' + diff --git a/src/library_gl.js b/src/library_gl.js index 6e0e04dc..aace0678 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -4470,6 +4470,7 @@ var LibraryGL = { return 1 /* GL_TRUE */; }, + gluOrtho2D__deps: ['glOrtho'], gluOrtho2D: function(left, right, bottom, top) { _glOrtho(left, right, bottom, top, -1, 1); }, |