aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-03 15:37:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 15:38:16 -0700
commit1b458cf9c55c1ad4f74f1d3332d163e506baf4e7 (patch)
tree974385b9a62a35bdef7e5e2f262eb5ea8c52808b
parentf2783ad48564c706713b05bd9f4679340ce8bab4 (diff)
abort with error message if dlopen called in asm.js mode without DLOPEN_SUPPORT
-rw-r--r--src/library.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 70cf5cc3..7894e033 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5076,6 +5076,12 @@ LibraryManager.library = {
// http://pubs.opengroup.org/onlinepubs/009695399/functions/dlopen.html
filename = filename === 0 ? '__self__' : (ENV['LD_LIBRARY_PATH'] || '/') + Pointer_stringify(filename);
+#if ASM_JS
+#if DLOPEN_SUPPORT == 0
+ abort('need to build with DLOPEN_SUPPORT=1 to get dlopen support in asm.js');
+#endif
+#endif
+
if (DLFCN.loadedLibNames[filename]) {
// Already loaded; increment ref count and return.
var handle = DLFCN.loadedLibNames[filename];