aboutsummaryrefslogtreecommitdiffstats
path: root/testing/emscripten/embuilder-fix-task-all-for-wasm.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-31 20:50:34 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-03 00:33:48 +0200
commit8d0158e08f0eb769c2208d23e46673f7cb705189 (patch)
tree20f79571a571c6681aae3ff175182bac412823b6 /testing/emscripten/embuilder-fix-task-all-for-wasm.patch
parent14286b372051d27be543244666881f79198c0cbf (diff)
downloadaports-8d0158e08f0eb769c2208d23e46673f7cb705189.tar.bz2
aports-8d0158e08f0eb769c2208d23e46673f7cb705189.tar.xz
testing/emscripten: fix multiple issues
Diffstat (limited to 'testing/emscripten/embuilder-fix-task-all-for-wasm.patch')
-rw-r--r--testing/emscripten/embuilder-fix-task-all-for-wasm.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/emscripten/embuilder-fix-task-all-for-wasm.patch b/testing/emscripten/embuilder-fix-task-all-for-wasm.patch
new file mode 100644
index 0000000000..375891e6eb
--- /dev/null
+++ b/testing/emscripten/embuilder-fix-task-all-for-wasm.patch
@@ -0,0 +1,35 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sun, 2 Apr 2017 23:11:41 +0200
+Subject: [PATCH] embuilder: if EMCC_WASM_BACKEND, omit tasks using pthreads
+ from ALL
+
+Fixes the following error:
+
+ $ EMCC_WASM_BACKEND=1 ./embuild build ALL
+ Traceback (most recent call last):
+ File "emscripten/src/emscripten-1.37.9/emcc", line 13, in <module>
+ emcc.run()
+ File "emscripten/src/emscripten-1.37.9/emcc.py", line 1278, in run
+ assert not shared.Settings.USE_PTHREADS, 'WebAssembly does not support pthreads'
+ AssertionError: WebAssembly does not support pthreads
+
+Upstream-Issue: https://github.com/kripken/emscripten/pull/5107
+---
+ embuilder.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/embuilder.py b/embuilder.py
+index 6674ccd..eaa762a 100755
+--- a/embuilder.py
++++ b/embuilder.py
+@@ -84,6 +84,10 @@ def build_port(port_name, lib_name, params):
+ tasks = sys.argv[2:]
+ if 'ALL' in tasks:
+ tasks = ['libc', 'libc-mt', 'dlmalloc', 'dlmalloc_threadsafe', 'pthreads', 'libcxx', 'libcxx_noexcept', 'libcxxabi', 'gl', 'binaryen', 'bullet', 'freetype', 'libpng', 'ogg', 'sdl2', 'sdl2-image', 'sdl2-ttf', 'sdl2-net', 'vorbis', 'zlib']
++ if os.environ.get('EMCC_WASM_BACKEND') == '1':
++ skip_tasks = {'libc-mt', 'dlmalloc_threadsafe', 'pthreads'}
++ print('Skipping building of %s, because WebAssembly does not support pthreads.' % ', '.join(skip_tasks))
++ tasks = [x for x in tasks if x not in skip_tasks]
+ if os.environ.get('EMSCRIPTEN_NATIVE_OPTIMIZER'):
+ print 'Skipping building of native-optimizer since environment variable EMSCRIPTEN_NATIVE_OPTIMIZER is present and set to point to a prebuilt native optimizer path.'
+ elif hasattr(shared, 'EMSCRIPTEN_NATIVE_OPTIMIZER'):