Skip to content

Commit

Permalink
Support for "assertion" builds
Browse files Browse the repository at this point in the history
Any version string prefixed with "assertions-" will be added the extra
config for enabling a subset of internal checkings.

refs compiler-explorer/compiler-explorer#7115

Signed-off-by: Marc Poulhiès <[email protected]>
  • Loading branch information
dkm committed Dec 3, 2024
1 parent 2b8dc6e commit caca076
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ INSTALL_TARGET=install-strip
MULTILIB_ENABLED="--enable-multilib"
WITH_ABI="--with-abi=m64"

ORIG_VERSION="${VERSION}"
VERSION=${VERSION#"assertions-"}

if echo "${VERSION}" | grep 'embed-trunk'; then
VERSION=embed-trunk-$(date +%Y%m%d)
URL=https://github.com/ThePhD/gcc.git
Expand Down Expand Up @@ -102,13 +105,13 @@ elif echo "${VERSION}" | grep 'cobol-master'; then
## implicit dep on C++ as libgcobol uses libstdc++.
LANGUAGES=cobol,c++
elif echo "${VERSION}" | grep 'trunk'; then
VERSION=trunk-$(date +%Y%m%d)
URL=git://gcc.gnu.org/git/gcc.git
BRANCH=master
MAJOR=15
MAJOR_MINOR=15-trunk
LANGUAGES="${LANGUAGES},go,d,rust,m2"
CONFIG+=" --enable-libstdcxx-backtrace=yes"
VERSION=trunk-$(date +%Y%m%d)
elif echo "${VERSION}" | grep 'renovated'; then
SUB_VERSION=$(echo "${VERSION}" | cut -d'-' -f2)
URL="https://github.com/jwakely/gcc"
Expand Down Expand Up @@ -147,6 +150,14 @@ else
if [[ "${MAJOR}" -ge 14 ]]; then LANGUAGES=${LANGUAGES},rust; fi

fi

## If version is prefixed by "assertions-", do the extra steps we want for the
## assertions- builds.
if [[ "${ORIG_VERSION}" == assertions-* ]]; then
VERSION="assertions-${VERSION}"
CONFIG+=" --enable-checking=yes,rtl,extra"
fi

FULLNAME=gcc-${VERSION}
OUTPUT=${ROOT}/${FULLNAME}.tar.xz
S3OUTPUT=""
Expand Down

0 comments on commit caca076

Please sign in to comment.