diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-14 15:31:56 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-14 15:31:56 -0800 |
commit | 284a433e94aa4ff93f2ad2415405a84324204b03 (patch) | |
tree | d4bc528b1fcc8c85f423f92ed65edb6664604de5 | |
parent | a86056437ae71c77ce2a2b5a3447c293c199ef2a (diff) |
must have named globals in shared libs
-rw-r--r-- | src/compiler.js | 1 | ||||
-rwxr-xr-x | tests/runner.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler.js b/src/compiler.js index 7ca20c40..ecfd506e 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -176,6 +176,7 @@ if (ASM_JS) { assert(!ALLOW_MEMORY_GROWTH, 'Cannot grow asm.js heap'); assert((TOTAL_MEMORY&(TOTAL_MEMORY-1)) == 0, 'asm.js heap must be power of 2'); } +assert(!(!NAMED_GLOBALS && BUILD_AS_SHARED_LIB)); // shared libraries must have named globals // Output some info and warnings based on settings diff --git a/tests/runner.py b/tests/runner.py index f1f0b997..e90dc4cf 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3947,6 +3947,7 @@ The current type of b is: 9 def test_dlfcn_basic(self): if Settings.ASM_JS: return self.skip('TODO: dlopen in asm') + Settings.NAMED_GLOBALS = 1 Settings.LINKABLE = 1 lib_src = ''' @@ -4001,6 +4002,7 @@ def process(filename): if Settings.ASM_JS: return self.skip('TODO: dlopen in asm') Settings.LINKABLE = 1 + Settings.NAMED_GLOBALS = 1 if Settings.USE_TYPED_ARRAYS == 2: Settings.CORRECT_SIGNS = 1 # Needed for unsafe optimizations @@ -4256,6 +4258,7 @@ def process(filename): if Settings.ASM_JS: return self.skip('TODO: dlopen in asm') Settings.LINKABLE = 1 + Settings.NAMED_GLOBALS = 1 if Building.LLVM_OPTS == 2: return self.skip('LLVM LTO will optimize things that prevent shared objects from working') if Settings.QUANTUM_SIZE == 1: return self.skip('FIXME: Add support for this') |