From cbbe8a87093995bcdec71771aca42dc098a4b37b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 28 Aug 2023 00:13:19 +0100 Subject: Perform minor build script tidying - Add a couple of overdue -Werrors that make life easier - Reshuffle cc/ld flags a bit, mainly around -fuse-ld=lld --- compile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compile') diff --git a/compile b/compile index ce45ced..e5852d2 100755 --- a/compile +++ b/compile @@ -18,7 +18,8 @@ mkdir -p .build/include : "${HOSTCC:=clang}" warnings="-Wall -pedantic -Wno-parentheses -Wno-missing-braces \ --Wno-gnu-zero-variadic-macro-arguments" +-Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration \ +-Werror=vla" dbg=0 if [ "$dbg" = 1 ]; then @@ -38,7 +39,7 @@ cc() { if [ "$_mn" = " -DMODULE_NAME=con_" ]; then _mn=" -DMODULE_NAME=con" elif [ "$_mn" = "-DMODULE_NAME=sst" ]; then _mn=; fi # note: using typeof and bool from C23 - see detailed comment in compile.bat - $CC -m32 -c -flto -fpic -fno-ident $cflags $warnings -I.build/include \ + $CC -c -flto -fpic -fno-ident $cflags $warnings -I.build/include \ -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64$_mn \ -Dtypeof=__typeof -include stdbool.h -o ".build/${_bn%%.c}.o" "src/$1" } -- cgit v1.2.3