File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
recipes/recipes/emscripten_emscripten-wasm32 Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -48,3 +48,9 @@ for file in $PREFIX/opt/emsdk/upstream/emscripten/*; do
4848 ln -sf $file $PREFIX /bin/
4949 fi
5050done
51+
52+ # Add wasm-opt wrapper. See NOTE in patches/wasm-opt-wrapper.
53+ EMSDK_DIR=$PREFIX /opt/emsdk/upstream
54+ mv $EMSDK_DIR /bin/wasm-opt $EMSDK_DIR /bin/wasm-opt-original
55+ cp $RECIPE_DIR /patches/wasm-opt-wrapper $EMSDK_DIR /bin/wasm-opt
56+ chmod +x $EMSDK_DIR /bin/wasm-opt
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # NOTE:
4+ # This is only required when using an external LLVM which is newer than the LLVM
5+ # version used by Emscripten; that is the case for packages using LLVM + Flang
6+ # such as Octave.
7+ # This wrapper should likely be removed once this package is upgraded to >3.1.73
8+ # The removal of these two flags should have no effect in any other packages
9+ # since these options are simply not supported (yet).
10+
11+ filtered_args=()
12+ for arg in " $@ " ; do
13+ if [[ " $arg " != " --enable-bulk-memory-opt" && " $arg " != " --enable-call-indirect-overlong" ]]; then
14+ filtered_args+=(" $arg " )
15+ fi
16+ done
17+
18+ $BUILD_PREFIX /opt/emsdk/upstream/bin/wasm-opt-original " ${filtered_args[@]} "
Original file line number Diff line number Diff line change 33 version : 3.1.73
44
55build :
6- number : 10
6+ number : 11
77
88outputs :
99 - package :
You can’t perform that action at this time.
0 commit comments