Sync wasi-test-wrapper.sh and wintest.bat
This commit is contained in:
parent
ac14901c30
commit
1bafad7899
@ -9,7 +9,7 @@ fi
|
||||
|
||||
if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmedge" ]; then
|
||||
if command -v wasmedgec >/dev/null && command -v wasmedge >/dev/null; then
|
||||
wasmedgec "$1" "${1}.so" &&
|
||||
wasmedgec "$1" "${1}.so" >/dev/null &&
|
||||
wasmedge --dir=.:. "${1}.so" &&
|
||||
rm -f "${1}.so" &&
|
||||
exit 0
|
||||
@ -28,12 +28,6 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmtime" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wavm" ]; then
|
||||
if command -v wavm >/dev/null; then
|
||||
wavm run --abi=wasi "$1" && exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "bun" ]; then
|
||||
if echo | bun help >/dev/null 2>&1; then
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
if "%1" == "" (
|
||||
echo "Usage: wintest.bat <Release | ReleaseDLL | Debug | DebugDLL"
|
||||
echo "Usage: wintest.bat <Release | ReleaseDLL | Debug | DebugDLL> [ <x64 | ARM64> ]"
|
||||
goto :END
|
||||
)
|
||||
|
||||
@ -13,7 +13,8 @@ if not exist sodium_version.c (
|
||||
)
|
||||
)
|
||||
|
||||
if "%2" == "x64" (SET ARCH=x64) else (SET ARCH=Win32)
|
||||
if "%2" == "x64" (SET ARCH=x64) else if "%2" == "ARM64" (SET ARCH=ARM64) else (SET ARCH=ARM64)
|
||||
if "%2" == "ARM64" (SET CROSSCOMPILE=1) else (SET CROSSCOMPILE=0)
|
||||
SET CFLAGS=/nologo /DTEST_SRCDIR=\".\" /I..\..\src\libsodium\include\sodium /I..\..\src\libsodium\include /I..\quirks
|
||||
SET LDFLAGS=/link /LTCG advapi32.lib ..\..\Build\%1\%ARCH%\libsodium.lib
|
||||
if "%1" == "ReleaseDLL" ( goto :ReleaseDLL )
|
||||
@ -44,12 +45,16 @@ FOR %%f in (*.c) DO (
|
||||
echo %%f compile failed
|
||||
goto :END
|
||||
)
|
||||
if %CROSSCOMPILE% == 1 (
|
||||
echo %%f skipped
|
||||
) else (
|
||||
%%f.exe
|
||||
if errorlevel 1 (
|
||||
echo %%f failed
|
||||
) else (
|
||||
echo %%f ok
|
||||
)
|
||||
)
|
||||
)
|
||||
REM Remove temporary files
|
||||
del *.exe *.obj *.res
|
||||
|
Loading…
Reference in New Issue
Block a user