ports/devel/llvm-devel/files/gen-Makefile.snapshot.sh
Brooks Davis b3cbb02bd1 devel/llvm-devel: new snapshot
Bump major version to 19.

Add a build conflict with ${ARCH}-binutils for COMPILER_RT.  Technically
this is only an issue for 64-bit architectures that build 32-bit
sanitizers (the presence of <triple>-ld is picked up and it doesn't
pass some cmake test), but it's easier to just block all of them.
2024-02-13 16:40:48 +00:00

23 lines
530 B
Bash

#!/bin/sh
#
# Simple script to fetch the latest commits via the github API. Requires
# curl and jq. Uses unauthenticated access which is ratelimited to 60
# queries per hour.
get_repo_sha()
{
curl https://api.github.com/repos/llvm/$1/branches/main | \
jq -r '.commit.sha'
}
cat <<EOF > Makefile.snapshot
# Generated file! Do not edit!
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
LLVM_MAJOR= 19
LLVM_RELEASE= \${LLVM_MAJOR}.0.0
SNAPDATE= $(date +%Y%m%d)
LLVM_PROJECT_COMMIT= $(get_repo_sha llvm-project)
EOF