@@ -806,37 +806,20 @@ class Wasm32WASIBuild(UnixCrossBuild):
806806 """wasm32-wasi builder
807807
808808 * WASI SDK >= 16 must be installed to default path /opt/wasi-sdk
809- * WASIX must be installed to /opt/wasix
810- * ccache must be installed
811809 * wasmtime must be installed and on PATH
810+ * Tools/wasm/wasi-env detects presence of WASIX and ccache
812811 """
813812 buildersuffix = ".wasi"
814813 factory_tags = ["wasm" , "wasi" ]
815814 extra_configure_flags = [
816815 # debug builds exhaust the limited call stack on WASI
817816 "--without-pydebug" ,
818- # ipv6 is not supported on WASI
819- "--disable-ipv6" ,
820817 ]
821- wasi_sdk = "/opt/wasi-sdk"
822- wasi_sysroot = f"{ wasi_sdk } /share/wasi-sysroot"
823- wasix = "/opt/wasix"
824818 compile_environ = {
825819 "CONFIG_SITE" : "../../Tools/wasm/config.site-wasm32-wasi" ,
826- # use Clang from WASI-SDK
827- "CC" : f"ccache { wasi_sdk } /bin/clang" ,
828- "LDSHARED" : f"{ wasi_sdk } /bin/wasm-ld" ,
829- "AR" : f"{ wasi_sdk } /bin/llvm-ar" ,
830- # use WASIX library with POSIX stubs
831- "CFLAGS" : f"-isystem { wasix } /include" ,
832- "LDFLAGS" : f"-L{ wasix } /lib -lwasix" ,
833- # WASI-SDK does not have a 'wasm32-unknown-wasi-pkg-config' script
834- # force pkg-config into cross-compiling mode
835- "PKG_CONFIG_PATH" : "" ,
836- "PKG_CONFIG_SYSROOT_DIR" : wasi_sysroot ,
837- "PKG_CONFIG_LIBDIR" : f"{ wasi_sysroot } /lib/pkgconfig:{ wasi_sysroot } /share/pkgconfig" ,
838820 }
839821 host = "wasm32-unknown-wasi"
822+ host_configure_cmd = ["../../Tools/wasm/wasi-env" , "../../configure" ]
840823
841824 def setup (self , parallel , branch , test_with_PTY = False , ** kwargs ):
842825 self .addStep (
0 commit comments