From 5d89a5daec932b2b09ecc660319e8a4f2773fb18 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 19 Oct 2015 10:42:43 -0700 Subject: [PATCH 1/5] do not force stderr to STDOUT in check_execute --- tools/shared.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/shared.py b/tools/shared.py index 42a63796d30fc..817de1af83f56 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -1911,7 +1911,6 @@ def check_execute(cmd, *args, **kw): # TODO: use in more places. execute doesn't actually check that return values # are nonzero try: - kw['stderr'] = STDOUT subprocess.check_output(cmd, *args, **kw) logging.debug("Successfuly executed %s" % " ".join(cmd)) except subprocess.CalledProcessError as e: From 12706b0bd3dc2b584fce28f3b928626a0ca29e4c Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 19 Oct 2015 10:43:19 -0700 Subject: [PATCH 2/5] fix -s bug with a new -compiler param starting on the next arg --- emcc | 2 +- tests/test_other.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/emcc b/emcc index 13ee3ac4aed86..5c67d6f88d942 100755 --- a/emcc +++ b/emcc @@ -164,7 +164,7 @@ elif '-dumpmachine' in sys.argv: def is_minus_s_for_emcc(newargs, i): assert newargs[i] == '-s' - if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option + if i+1 < len(newargs) and '=' in newargs[i+1] and not newargs[i+1].startswith('-'): # -s OPT=VALUE is for us, -s by itself is a linker option return True else: logging.warning('treating -s as linker option and not as -s OPT=VALUE for js compilation') diff --git a/tests/test_other.py b/tests/test_other.py index c7cf485e83481..19675b6cb4e0d 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -5690,3 +5690,8 @@ def test_lib_include_flags(self): process = Popen([PYTHON, EMCC] + '-l m -l c -I'.split() + [path_from_root('tests', 'include_test'), path_from_root('tests', 'lib_include_flags.c')], stdout=PIPE, stderr=PIPE) process.communicate() assert process.returncode is 0, 'Empty -l/-L/-I flags should read the next arg as a param' + + def test_dash_s(self): + print check_execute([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-s', '-std=c++03']) + self.assertContained('hello, world!', run_js('a.out.js')) + From 56c505561291215fb27801c13b85c423de20faa1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 19 Oct 2015 10:43:38 -0700 Subject: [PATCH 3/5] reduce -s linker warning to debug --- emcc | 2 +- tests/test_other.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/emcc b/emcc index 5c67d6f88d942..60534fb75d442 100755 --- a/emcc +++ b/emcc @@ -167,7 +167,7 @@ def is_minus_s_for_emcc(newargs, i): if i+1 < len(newargs) and '=' in newargs[i+1] and not newargs[i+1].startswith('-'): # -s OPT=VALUE is for us, -s by itself is a linker option return True else: - logging.warning('treating -s as linker option and not as -s OPT=VALUE for js compilation') + logging.debug('treating -s as linker option and not as -s OPT=VALUE for js compilation') return False # If this is a configure-type thing, do not compile to JavaScript, instead use clang diff --git a/tests/test_other.py b/tests/test_other.py index 19675b6cb4e0d..cee844fa59847 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -2073,7 +2073,6 @@ def test_link_s(self): Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'supp.cpp'), '-o', 'supp.o']).communicate() output = Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'main.o'), '-s', os.path.join(self.get_dir(), 'supp.o'), '-s', 'SAFE_HEAP=1'], stderr=PIPE).communicate() - self.assertContained('treating -s as linker option', output[1]) output = run_js('a.out.js') assert 'yello' in output, 'code works' code = open('a.out.js').read() From 3a738fe10e7d1d592bfe0f61b03188355f5d9ad5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 20 Oct 2015 14:11:09 -0700 Subject: [PATCH 4/5] call stop(0) in WebAudio as a workaround for a WebKit bug #3861 --- src/library_sdl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library_sdl.js b/src/library_sdl.js index a344463c58920..cc4b365be44f6 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -1123,7 +1123,7 @@ var LibrarySDL = { // graph will send the onended signal, but we don't want to process that, since pausing should not clear/destroy the audio // channel. audio.webAudioNode['onended'] = undefined; - audio.webAudioNode.stop(); + audio.webAudioNode.stop(0); // 0 is a default parameter, but WebKit is confused by it #3861 audio.webAudioNode = undefined; } catch(e) { Module.printErr('pauseWebAudio failed: ' + e); From 9ba452a2903dd9018fcdab2dc2bef6efaf5f2ac8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 20 Oct 2015 17:34:57 -0700 Subject: [PATCH 5/5] 1.35.1 --- emscripten-version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emscripten-version.txt b/emscripten-version.txt index dcb4d54abf07a..8b9623a5e153d 100644 --- a/emscripten-version.txt +++ b/emscripten-version.txt @@ -1,2 +1,2 @@ -1.35.0 +1.35.1