Produce archive
Some checks failed
Builds / XTChain (linux) (push) Failing after 24s
Builds / XTChain (windows) (push) Failing after 23s

This commit is contained in:
Aiken Harris 2025-07-07 23:07:29 +02:00 committed by CodingWorkshop Signing Team
parent 153cfa0181
commit e691c95aee
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -372,14 +372,35 @@ xtchain_build()
cp ${WRKDIR}/scripts/xtchain${EXTENSION} ${BINDIR}/ cp ${WRKDIR}/scripts/xtchain${EXTENSION} ${BINDIR}/
} }
# This function generates XTCHAIN version file # This function generates XTCHAIN version file and produces tarball archive
xtchain_vergen() xtchain_tarball()
{ {
local EXTENSION=""
# Additional, target-specific configuration options
case "${SYSTEM_NAME}" in
Windows)
EXTENSION=".exe"
;;
esac
# Remove unneeded files to save disk space
echo ">>> Removing unneeded files to save disk space ..."
rm -rf ${BINDIR}/{doc,include,share/{bash-completion,emacs,info,locale,man,vim}}
for EXEC in amdgpu-arch clang-check clang-exdef-mapping clang-import-test clang-offload-* clang-rename clang-scan-deps diagtool hmaptool ld64.lld modularize nxptx-arch wasm-ld; do
rm -f ${BINDIR}/bin/${EXEC}${EXTENSION}
done
# Generate version file
cd ${WRKDIR} cd ${WRKDIR}
: ${XTCVER:=$(git describe --exact-match --tags 2>/dev/null)} : ${XTCVER:=$(git describe --exact-match --tags 2>/dev/null)}
: ${XTCVER:=DEVEL} : ${XTCVER:=DEVEL}
[ ${BUILD_MINIMAL} -eq 1 ] && XTCVER="${XTCVER}-min" [ ${BUILD_MINIMAL} -eq 1 ] && XTCVER="${XTCVER}-min"
echo "${XTCVER}" > ${BINDIR}/Version echo "${XTCVER}" > ${BINDIR}/Version
# Build tarball
echo ">>> Creating toolchain archive ..."
tar -I 'zstd -19' -cpf xtchain-${XTCVER}-${TARGET_SYSTEM}.tar.zst -C ${BINDIR} .
} }
@ -457,5 +478,5 @@ if [ ${BUILD_MINIMAL} -eq 0 ]; then
#ninja_build #ninja_build
fi fi
# Generate XTchain version file # Generate tarball archive
#xtchain_vergen #xtchain_tarball