From 6caf3c6157883860f915a3d5b7802843c954cc52 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sat, 20 Jan 2024 15:32:20 -0600 Subject: [PATCH] Wyrm build script --- misc/build-wyrm-transpiler.sh | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 misc/build-wyrm-transpiler.sh diff --git a/misc/build-wyrm-transpiler.sh b/misc/build-wyrm-transpiler.sh new file mode 100644 index 0000000..88e48ca --- /dev/null +++ b/misc/build-wyrm-transpiler.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -ex +source common.sh + +VERSION=$1 +if [[ "${VERSION}" = "trunk" ]]; then + VERSION=trunk-$(date +%Y%m%d) + BRANCH=master +else + BRANCH=V${VERSION} +fi + +URL=https://github.com/jeremy-rifkin/wyrm.git + +FULLNAME=wyrm-${VERSION}.tar.xz +OUTPUT=$2/${FULLNAME} + +REVISION="wyrm-$(get_remote_revision "${URL}" "heads/${BRANCH}")" +LAST_REVISION="${3:-}" + +initialise "${REVISION}" "${OUTPUT}" "${LAST_REVISION}" + +PREFIX=$(pwd)/prefix +DIR=$(pwd)/wyrm + +git clone "${URL}" "${DIR}" + +cd "${DIR}" + +mkdir build +cd build +CXX=/opt/compiler-explorer/gcc-12.1.0/bin/g++ +CC=/opt/compiler-explorer/gcc-12.1.0/bin/gcc +cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug +ninja + +mkdir -p "${PREFIX}" +cd .. +mv build "${PREFIX}/build" + +complete "${PREFIX}" "wyrm-${VERSION}" "${OUTPUT}"