Skip to content

Commit

Permalink
Add wyrm (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin authored Jan 21, 2024
1 parent e9a5248 commit 877ed97
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile.misc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
re2c \
perl \
cpanminus \
openssh-client
openssh-client \
libgmp-dev

RUN cd /tmp && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
Expand Down
42 changes: 42 additions & 0 deletions misc/build-wyrm-transpiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -ex
source common.sh

VERSION=$1
if [[ "${VERSION}" = "trunk" ]]; then
VERSION=trunk-$(date +%Y%m%d)
BRANCH=main
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}"

DIR=$(pwd)/wyrm
STAGING_DIR=/opt/compiler-explorer/wyrm-${VERSION}

git clone "${URL}" "${DIR}"

cd "${DIR}/transpiler"

mkdir build
cd build
export CXX=/opt/compiler-explorer/gcc-12.1.0/bin/g++
export CC=/opt/compiler-explorer/gcc-12.1.0/bin/gcc
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$STAGING_DIR"
ninja install

cp -v libplugin.so "${STAGING_DIR}"

patchelf --set-rpath '$ORIGIN/lib:/opt/compiler-explorer/gcc-12.1.0/lib64/' "${STAGING_DIR}/libplugin.so"

complete "${STAGING_DIR}" "wyrm-${VERSION}" "${OUTPUT}"

0 comments on commit 877ed97

Please sign in to comment.