Compare commits

..

2 Commits

Author SHA1 Message Date
ceabd22b70 Make compiler-rt version match the clang version in the gitea action 2025-04-17 16:35:23 +02:00
bf3fd83b64 Let the release build error on warnings
Add -Werror to the release configuration. Also add the release build as
a dependency of the make validate rule. The idea is that builds should
not pass validation if they have warnings but it shouldn't stop debug
builds during development from compiling while work is in progress.
2025-04-17 15:18:28 +02:00
3 changed files with 6 additions and 3 deletions

@ -16,8 +16,11 @@ jobs:
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
# determine appropriate clang version
RT_VERSION=$(apk add --simulate compiler-rt | grep -o "compiler-rt-[0-9]*" | grep -o "[0-9]*")
apk update apk update
apk add --no-cache llvm19 clang19 clang19-analyzer compiler-rt valgrind apk add --no-cache llvm${RT_VERSION} clang${RT_VERSION} clang${RT_VERSION}-analyzer compiler-rt valgrind
# Verify versions # Verify versions
echo "---------------------" echo "---------------------"

@ -21,7 +21,7 @@ asan:
msan: msan:
make -rRf make/msan.mk all make -rRf make/msan.mk all
validate: asan msan debug validate: asan msan debug release
./validate.sh ./validate.sh
analyze: analyze:

@ -1,4 +1,4 @@
CFLAGS?=-Wall -Wextra -Wpedantic -O2 -std=c23 -flto -fomit-frame-pointer -DNDEBUG -D_POSIX_C_SOURCE=200809L CFLAGS?=-Wall -Wextra -Wpedantic -Werror -O2 -std=c23 -flto -fomit-frame-pointer -DNDEBUG -D_POSIX_C_SOURCE=200809L
LDFLAGS?=-flto -s -Wl,--gc-sections LDFLAGS?=-flto -s -Wl,--gc-sections
BUILD_DIR?=build/release/ BUILD_DIR?=build/release/