diff --git a/README.md b/README.md index eab21fb21139c6b366e37b7fb06dc832047dcef3..65f7fa00b6d969f3510f18969746ced76c3b0d16 100644 --- a/README.md +++ b/README.md @@ -136,19 +136,12 @@ List of wasm extensions that we use: - [Multi-value](https://github.com/WebAssembly/spec/blob/master/proposals/multi-value/Overview.md) - [Reference Types](https://github.com/WebAssembly/spec/blob/master/proposals/reference-types/Overview.md) +- [Tail + Call](https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md) The target triple is `wasm32-wasi`, and it uses WASI snapshot 1 as used in `wasi-libc`. -List of wasm extensions that we don't use yet but are keeping an eye -on: - -- [Tail - Call](https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md), - blocked by [webkit](https://bugs.webkit.org/show_bug.cgi?id=215275). - Note that we already support wasm tail calls, but it's an opt-in - feature for now. - ## What runtimes support those `.wasm` files? The output `.wasm` modules are known to run on these runtimes: @@ -609,8 +602,8 @@ export RANLIB=~/.ghc-wasm/wasi-sdk/bin/llvm-ranlib export SIZE=~/.ghc-wasm/wasi-sdk/bin/llvm-size export STRINGS=~/.ghc-wasm/wasi-sdk/bin/llvm-strings export STRIP=~/.ghc-wasm/wasi-sdk/bin/llvm-strip -export CONF_CC_OPTS_STAGE2="-Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types" -export CONF_CXX_OPTS_STAGE2="-fno-exceptions -Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types" +export CONF_CC_OPTS_STAGE2="-Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call" +export CONF_CXX_OPTS_STAGE2="-fno-exceptions -Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call" export CONF_GCC_LINKER_OPTS_STAGE2="-Wl,--error-limit=0,--keep-section=ghc_wasm_jsffi,--keep-section=target_features,--stack-first,--strip-debug " export CONFIGURE_ARGS="--target=wasm32-wasi --with-intree-gmp --with-system-libffi" ``` diff --git a/pkgs/wasi-sdk-setup-hook.sh b/pkgs/wasi-sdk-setup-hook.sh index 5a7e9f0d7356e60d2b0265c87cbdb895bd502e16..002fa77b1ae8872c7c37d73efe144a9a1c1d6959 100644 --- a/pkgs/wasi-sdk-setup-hook.sh +++ b/pkgs/wasi-sdk-setup-hook.sh @@ -11,8 +11,8 @@ addWasiSDKHook() { export SIZE=@out@/bin/llvm-size export STRINGS=@out@/bin/llvm-strings export STRIP=@out@/bin/llvm-strip - export CONF_CC_OPTS_STAGE2="-Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types" - export CONF_CXX_OPTS_STAGE2="-fno-exceptions -Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types" + export CONF_CC_OPTS_STAGE2="-Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call" + export CONF_CXX_OPTS_STAGE2="-fno-exceptions -Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call" export CONF_GCC_LINKER_OPTS_STAGE2="-Wl,--error-limit=0,--keep-section=ghc_wasm_jsffi,--keep-section=target_features,--stack-first,--strip-debug" export CONF_CC_OPTS_STAGE1=$CONF_CC_OPTS_STAGE2 export CONF_CXX_OPTS_STAGE1=$CONF_CXX_OPTS_STAGE2 diff --git a/setup.sh b/setup.sh index d521ba50bf6260a620469b6f8203e01184ea8c00..9f803b672689a59eba1b0a17baf4a0c0e06ddd1d 100755 --- a/setup.sh +++ b/setup.sh @@ -154,11 +154,11 @@ do done for e in \ - 'CONF_CC_OPTS_STAGE2=${CONF_CC_OPTS_STAGE2:-"-Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types"}' \ - 'CONF_CXX_OPTS_STAGE2=${CONF_CXX_OPTS_STAGE2:-"-fno-exceptions -Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types"}' \ + 'CONF_CC_OPTS_STAGE2=${CONF_CC_OPTS_STAGE2:-"-Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call"}' \ + 'CONF_CXX_OPTS_STAGE2=${CONF_CXX_OPTS_STAGE2:-"-fno-exceptions -Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call"}' \ 'CONF_GCC_LINKER_OPTS_STAGE2=${CONF_GCC_LINKER_OPTS_STAGE2:-"-Wl,--error-limit=0,--keep-section=ghc_wasm_jsffi,--keep-section=target_features,--stack-first,--strip-debug "}' \ - 'CONF_CC_OPTS_STAGE1=${CONF_CC_OPTS_STAGE1:-"-Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types"}' \ - 'CONF_CXX_OPTS_STAGE1=${CONF_CXX_OPTS_STAGE1:-"-fno-exceptions -Wno-error=int-conversion -O3 -msimd128 -mnontrapping-fptoint -msign-ext -mbulk-memory -mmutable-globals -mmultivalue -mreference-types"}' \ + 'CONF_CC_OPTS_STAGE1=${CONF_CC_OPTS_STAGE1:-"-Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call"}' \ + 'CONF_CXX_OPTS_STAGE1=${CONF_CXX_OPTS_STAGE1:-"-fno-exceptions -Wno-error=int-conversion -O3 -mcpu=lime1 -mreference-types -msimd128 -mtail-call"}' \ 'CONF_GCC_LINKER_OPTS_STAGE1=${CONF_GCC_LINKER_OPTS_STAGE1:-"-Wl,--error-limit=0,--keep-section=ghc_wasm_jsffi,--keep-section=target_features,--stack-first,--strip-debug "}' \ "CONFIGURE_ARGS=\"--host=$HOST --target=wasm32-wasi --with-intree-gmp --with-system-libffi\"" \ 'CROSS_EMULATOR=${CROSS_EMULATOR:-"'"$PREFIX/wasm-run/bin/wasm-run.mjs"'"}'