krata: rework cross-compilation

This commit is contained in:
Alex Zenla
2024-03-21 21:31:10 +00:00
parent 332a1bba26
commit 0191e5b2c1
27 changed files with 321 additions and 131 deletions

15
hack/build/cross-compile.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
TOOLS_DIR="$(dirname "${0}")"
RUST_TARGET="$("${TOOLS_DIR}/target.sh")"
TARGET_ARCH="$(echo "${RUST_TARGET}" | awk -F '-' '{print $1}')"
HOST_ARCH="$(uname -m)"
if [ "${HOST_ARCH}" != "${TARGET_ARCH}" ]
then
echo "1"
else
echo "0"
fi