diff --git a/emsdk-cc b/emsdk-cc index 7685aba..e224872 100644 --- a/emsdk-cc +++ b/emsdk-cc @@ -125,6 +125,8 @@ WASM_EXTRA = env("WASM_EXTRA", "") + " " + env("WASM_OPTS", "") # the only sane default for now COPTS = env("COPTS", "-O2 -g3") +SIZEOPT = '-Os' in COPTS + MAIN_MODULE = LINKING = STATIC = False EXE = False @@ -366,7 +368,8 @@ else: except Exception as e: dbg("ERROR: 312", e) - final.append("-sENVIRONMENT=node") + if SIZEOPT: + final.append("-sENVIRONMENT=node") # error: explicitly setting EXIT_RUNTIME not compatible with STANDALONE_WASM. # EXIT_RUNTIME will always be True for programs (with a main function) and False for reactors (not main function). @@ -378,7 +381,7 @@ else: __import__("atexit").register(make_exe) elif HTML: - if "-sENVIRONMENT=web" not in out: + if SIZEOPT and ("-sENVIRONMENT=web" not in out): final.append("-sENVIRONMENT=web") # maybe not pass all WASM opts when -c + -o but always PIC and opt level diff --git a/python-wasi-sdk.sh b/python-wasi-sdk.sh index 491ab66..3235b83 100755 --- a/python-wasi-sdk.sh +++ b/python-wasi-sdk.sh @@ -172,10 +172,10 @@ END echo "keeping installed wasmtime and wasi binaries" else #wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz - + # wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \ # TODO: window only has a zip archive, better use wasmtime-py instead. - wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \ + wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-$(PLATFORM).tar.xz \ -O-|xzcat|tar xfv - mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin fi diff --git a/python-wasm-sdk.sh b/python-wasm-sdk.sh index 491ab66..3235b83 100755 --- a/python-wasm-sdk.sh +++ b/python-wasm-sdk.sh @@ -172,10 +172,10 @@ END echo "keeping installed wasmtime and wasi binaries" else #wget https://github.com/bytecodealliance/wasmtime/releases/download/v22.0.0/wasmtime-v22.0.0-x86_64-linux.tar.xz - + # wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \ # TODO: window only has a zip archive, better use wasmtime-py instead. - wget https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-$(arch)-$(PLATFORM).tar.xz \ + wget https://github.com/bytecodealliance/wasmtime/releases/download/v27.0.0/wasmtime-v27.0.0-$(arch)-$(PLATFORM).tar.xz \ -O-|xzcat|tar xfv - mv -vf $(find wasmtime*|grep /wasmtime$) ${SDKROOT}/devices/$(arch)/usr/bin fi diff --git a/wasisdk/hotfix/grp.h b/wasisdk/hotfix/grp.h index e69de29..8337712 100644 --- a/wasisdk/hotfix/grp.h +++ b/wasisdk/hotfix/grp.h @@ -0,0 +1 @@ +//