diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:12:41 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-13 14:12:41 -0800 |
commit | a5d305c2737d56870a55cc21e2f7906e58fd11e4 (patch) | |
tree | ab2ec99411939da5362e563bc0964946f5622081 | |
parent | dc8b20bbb26d4a10119f07b58e02a1a15eccd07c (diff) |
default to NAMED_GLOBALS
-rw-r--r-- | src/settings.js | 2 | ||||
-rwxr-xr-x | tests/runner.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/settings.js b/src/settings.js index acf71c03..af2e8082 100644 --- a/src/settings.js +++ b/src/settings.js @@ -194,7 +194,7 @@ var PGO = 0; // Profile-guided optimization. // All CORRECT_* options default to 1 with PGO builds. // See https://github.com/kripken/emscripten/wiki/Optimizing-Code for more info -var NAMED_GLOBALS = 1; // If 1, we use global variables for globals. Otherwise +var NAMED_GLOBALS = 0; // If 1, we use global variables for globals. Otherwise // they are referred to by a base plus an offset (called an indexed global), // saving global variables but adding runtime overhead. diff --git a/tests/runner.py b/tests/runner.py index 5f8c58a2..f1f0b997 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3928,7 +3928,6 @@ The current type of b is: 9 def test_runtimelink(self): if Building.LLVM_OPTS: return self.skip('LLVM opts will optimize printf into puts in the parent, and the child will still look for puts') - if Settings.NAMED_GLOBALS == 0: return self.skip('dlopen cannot work without named globals, TODO') if Settings.ASM_JS: return self.skip('asm does not support runtime linking') main, supp = self.setup_runtimelink_test() @@ -3936,6 +3935,7 @@ The current type of b is: 9 self.banned_js_engines = [NODE_JS] # node's global scope behaves differently than everything else, needs investigation FIXME Settings.LINKABLE = 1 Settings.BUILD_AS_SHARED_LIB = 2 + Settings.NAMED_GLOBALS = 1 self.build(supp, self.get_dir(), self.in_dir('supp.c')) shutil.move(self.in_dir('supp.c.o.js'), self.in_dir('liblib.so')) @@ -4094,9 +4094,9 @@ def process(filename): def test_dlfcn_data_and_fptr(self): if Settings.ASM_JS: return self.skip('TODO: dlopen in asm') if Building.LLVM_OPTS: return self.skip('LLVM opts will optimize out parent_func') - if Settings.NAMED_GLOBALS == 0: return self.skip('dlopen cannot work without named globals, TODO') Settings.LINKABLE = 1 + Settings.NAMED_GLOBALS = 1 lib_src = ''' #include <stdio.h> @@ -4199,9 +4199,9 @@ 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 away stuff we expect from the shared library') - if Settings.NAMED_GLOBALS == 0: return self.skip('dlopen cannot work without named globals, TODO') lib_src = r''' #include <stdio.h> @@ -6219,7 +6219,7 @@ void*:16 self.do_run(path_from_root('tests', 'cubescript'), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp') def test_gcc_unmangler(self): - Settings.NAMED_GLOBALS = 0 # test coverage for this + Settings.NAMED_GLOBALS = 1 # test coverage for this Building.COMPILER_TEST_OPTS = ['-I' + path_from_root('third_party')] |