Skip to content

Commit caca076

Browse files
committed
Support for "assertion" builds
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 <dkm@kataplop.net>
1 parent 2b8dc6e commit caca076

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build/build.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ INSTALL_TARGET=install-strip
2222
MULTILIB_ENABLED="--enable-multilib"
2323
WITH_ABI="--with-abi=m64"
2424

25+
ORIG_VERSION="${VERSION}"
26+
VERSION=${VERSION#"assertions-"}
27+
2528
if echo "${VERSION}" | grep 'embed-trunk'; then
2629
VERSION=embed-trunk-$(date +%Y%m%d)
2730
URL=https://github.com/ThePhD/gcc.git
@@ -102,13 +105,13 @@ elif echo "${VERSION}" | grep 'cobol-master'; then
102105
## implicit dep on C++ as libgcobol uses libstdc++.
103106
LANGUAGES=cobol,c++
104107
elif echo "${VERSION}" | grep 'trunk'; then
105-
VERSION=trunk-$(date +%Y%m%d)
106108
URL=git://gcc.gnu.org/git/gcc.git
107109
BRANCH=master
108110
MAJOR=15
109111
MAJOR_MINOR=15-trunk
110112
LANGUAGES="${LANGUAGES},go,d,rust,m2"
111113
CONFIG+=" --enable-libstdcxx-backtrace=yes"
114+
VERSION=trunk-$(date +%Y%m%d)
112115
elif echo "${VERSION}" | grep 'renovated'; then
113116
SUB_VERSION=$(echo "${VERSION}" | cut -d'-' -f2)
114117
URL="https://github.com/jwakely/gcc"
@@ -147,6 +150,14 @@ else
147150
if [[ "${MAJOR}" -ge 14 ]]; then LANGUAGES=${LANGUAGES},rust; fi
148151

149152
fi
153+
154+
## If version is prefixed by "assertions-", do the extra steps we want for the
155+
## assertions- builds.
156+
if [[ "${ORIG_VERSION}" == assertions-* ]]; then
157+
VERSION="assertions-${VERSION}"
158+
CONFIG+=" --enable-checking=yes,rtl,extra"
159+
fi
160+
150161
FULLNAME=gcc-${VERSION}
151162
OUTPUT=${ROOT}/${FULLNAME}.tar.xz
152163
S3OUTPUT=""

0 commit comments

Comments
 (0)