diff options
-rw-r--r-- | src/jsifier.js | 4 | ||||
-rwxr-xr-x | tests/runner.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 4263618a..38029377 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -513,7 +513,9 @@ function JSify(data, functionsOnly, givenFunctions) { item.JS = addFromLibrary(shortident); } else if (!LibraryManager.library.hasOwnProperty(shortident + '__inline')) { item.JS = 'var ' + item.ident + '; // stub for ' + item.ident; - if (WARN_ON_UNDEFINED_SYMBOLS || ASM_JS) { // always warn on undefs in asm, since it breaks validation + if (ASM_JS) { + throw 'Unresolved symbol: ' + item.ident + ', this must be corrected for asm.js validation to succeed'; + } else if (WARN_ON_UNDEFINED_SYMBOLS) { warn('Unresolved symbol: ' + item.ident); } } diff --git a/tests/runner.py b/tests/runner.py index f2a0bd4e..9ca444fb 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -9329,7 +9329,7 @@ f.close() filename = self.in_dir('src.cpp') open(filename, 'w').write(src) out, err = Popen([PYTHON, EMCC, filename, '-s', 'ASM_JS=1', '-O2'], stderr=PIPE).communicate() - assert 'Warning: Unresolved symbol' in err, 'always warn on undefs in asm, since it breaks validation' + assert 'Unresolved symbol' in err, 'always warn on undefs in asm, since it breaks validation: ' + err def test_redundant_link(self): lib = "int mult() { return 1; }" |