kratactl: initial windows bringup

This commit is contained in:
Alex Zenla
2024-03-21 19:54:14 -07:00
parent 5fd10d6edf
commit a3a2148002
7 changed files with 78 additions and 17 deletions

View File

@ -14,8 +14,14 @@ then
fi
HOST_OS="$(uname -s)"
HOST_OS="$(echo "${HOST_OS}" | awk -F '_' '{print $1}')"
HOST_OS="$(echo "${HOST_OS}" | tr '[:upper:]' '[:lower:]')"
if [ "${HOST_OS}" = "mingw64" ]
then
HOST_OS="windows"
fi
if [ -z "${TARGET_OS}" ]
then
TARGET_OS="${HOST_OS}"

View File

@ -19,7 +19,13 @@ fi
if [ -z "${TARGET_OS}" ]
then
TARGET_OS="$(uname -s)"
TARGET_OS="$(echo "${TARGET_OS}" | awk -F '_' '{print $1}')"
TARGET_OS="$(echo "${TARGET_OS}" | tr '[:upper:]' '[:lower:]')"
if [ "${TARGET_OS}" = "mingw64" ]
then
TARGET_OS="windows"
fi
fi
if [ "${TARGET_OS}" = "darwin" ]
@ -36,6 +42,20 @@ then
RUST_TARGET="aarch64-apple-darwin"
fi
fi
elif [ "${TARGET_OS}" = "windows" ]
then
if [ -z "${RUST_TARGET}" ]
then
if [ "${TARGET_ARCH}" = "x86_64" ]
then
RUST_TARGET="x86_64-pc-windows-msvc"
fi
if [ "${TARGET_ARCH}" = "aarch64" ]
then
RUST_TARGET="aarch64-pc-windows-msvc"
fi
fi
else
if [ -z "${RUST_TARGET}" ]
then