diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-31 20:50:34 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-03 00:33:48 +0200 |
commit | 8d0158e08f0eb769c2208d23e46673f7cb705189 (patch) | |
tree | 20f79571a571c6681aae3ff175182bac412823b6 /testing/emscripten/embuilder-omit-provided.patch | |
parent | 14286b372051d27be543244666881f79198c0cbf (diff) | |
download | aports-8d0158e08f0eb769c2208d23e46673f7cb705189.tar.bz2 aports-8d0158e08f0eb769c2208d23e46673f7cb705189.tar.xz |
testing/emscripten: fix multiple issues
Diffstat (limited to 'testing/emscripten/embuilder-omit-provided.patch')
-rw-r--r-- | testing/emscripten/embuilder-omit-provided.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/testing/emscripten/embuilder-omit-provided.patch b/testing/emscripten/embuilder-omit-provided.patch new file mode 100644 index 0000000000..5bdcc26f82 --- /dev/null +++ b/testing/emscripten/embuilder-omit-provided.patch @@ -0,0 +1,67 @@ +Remove task for building native_optimizer and binaryen. It's not needed, +because we ship this binary as a package. Also we don't build +emscripten-fastcomp with X86 target, so it can't be used to build this native +binary. + +--- a/embuilder.py ++++ b/embuilder.py +@@ -33,8 +33,6 @@ + libcxx_noexcept + libcxxabi + gl +- native_optimizer +- binaryen + bullet + freetype + libpng +@@ -48,14 +46,10 @@ + + Issuing 'embuilder.py build ALL' causes each task to be built. + +-It is also possible to build native_optimizer manually by using CMake. To +-do that, run ++Do not use this tool to build native_optimizer manually - it's already ++installed and configured on Alpine Linux. + +- 1. cd $EMSCRIPTEN/tools/optimizer +- 2. cmake . -DCMAKE_BUILD_TYPE=Release +- 3. make (or mingw32-make/vcbuild/msbuild on Windows) +- +-and set up the location to the native optimizer in ~/.emscripten ++If you need binaryen, install it with apk: apk add binaryen. + + ''' + sys.exit(0) +@@ -88,12 +82,6 @@ + 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'): +- print 'Skipping building of native-optimizer since .emscripten config file has set EMSCRIPTEN_NATIVE_OPTIMIZER to point to a prebuilt native optimizer path.' +- else: +- tasks += ['native_optimizer'] + for what in tasks: + shared.logging.info('building and verifying ' + what) + if what in ('libc', 'dlmalloc'): +@@ -146,9 +134,7 @@ + } + ''', ['gl.bc']) + elif what == 'native_optimizer': +- build(''' +- int main() {} +- ''', ['optimizer.2.exe'], ['-O2']) ++ shared.logging.warning('native_optimizer is already installed: /usr/bin/emoptimizer. Skipping build.') + elif what == 'wasm_compiler_rt': + if shared.get_llvm_target() == shared.WASM_TARGET: + build(''' +@@ -177,7 +163,7 @@ + elif what == 'sdl2-ttf': + build_port('sdl2-ttf', 'libsdl2_ttf.bc', ['-s', 'USE_SDL=2', '-s', 'USE_SDL_TTF=2', '-s', 'USE_FREETYPE=1']) + elif what == 'binaryen': +- build_port('binaryen', None, ['-s', 'BINARYEN=1']) ++ shared.logging.warning('Run "apk add binaryen" to install binaryen. Skipping build.') + else: + shared.logging.error('unfamiliar build target: ' + what) + sys.exit(1) |