scripts: not hardcode MSYSTEM (#1739)

This commit is contained in:
Takase
2024-03-23 20:28:31 +08:00
committed by takase1121
parent ddf08de1d4
commit 5296f8de4b
4 changed files with 45 additions and 20 deletions
+9 -3
View File
@@ -77,11 +77,17 @@ get_platform_arch() {
platform=$(get_platform_name)
arch=${CROSS_ARCH:-$(uname -m)}
if [[ $MSYSTEM != "" ]]; then
if [[ $MSYSTEM == "MINGW64" ]]; then
case "$MSYSTEM" in
MINGW64|UCRT64|CLANG64)
arch=x86_64
else
;;
MINGW32|CLANG32)
arch=i686
fi
;;
CLANGARM64)
arch=aarch64
;;
esac
fi
echo "$arch"
}