diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-04 09:49:52 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-04 09:49:52 -0700 |
commit | 0560adda8a6c0259478a54e5b514ceaafe8fc10c (patch) | |
tree | 2060c0e6f5de027d6c3c9de37d793d8515e5c119 | |
parent | 91cf5f4ffc98fb0a610910d19f529ac464d92290 (diff) |
emit aborting stubs for DEAD_FUNCTIONS
-rw-r--r-- | src/jsifier.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 46d8ae74..c21e7995 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -490,7 +490,7 @@ function JSify(data, functionsOnly, givenFunctions) { if (!LINKABLE && !LibraryManager.library.hasOwnProperty(shortident) && !LibraryManager.library.hasOwnProperty(shortident + '__inline')) { if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + shortident); if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) printErr('warning: unresolved symbol: ' + shortident); - if (ASM_JS) { + if (ASM_JS || item.ident in DEAD_FUNCTIONS) { // emit a stub that will fail during runtime. this allows asm validation to succeed. LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);"); } else { |