summaryrefslogtreecommitdiffstats
path: root/build/cc.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-07-09 09:57:00 -0400
committerTavian Barnes <tavianator@tavianator.com>2025-07-09 10:11:29 -0400
commit6d0240aa07076819cf454d13a21c3e1e0d13c6bf (patch)
tree2fe4cb0c6f84fbabdbdc9bbfa2df714e2a5bc5da /build/cc.sh
parenta69f4fb067ec22b95741e37efe355fb1106fefd2 (diff)
downloadbfs-6d0240aa07076819cf454d13a21c3e1e0d13c6bf.tar.xz
build/flags-if: Support multiple flag groups
Diffstat (limited to 'build/cc.sh')
-rwxr-xr-xbuild/cc.sh21
1 files changed, 3 insertions, 18 deletions
diff --git a/build/cc.sh b/build/cc.sh
index e1d2b0b..b6f38b5 100755
--- a/build/cc.sh
+++ b/build/cc.sh
@@ -9,26 +9,11 @@
set -eu
-QUIET=
+# Without -q, print the executed command for config.log
if [ "$1" = "-q" ]; then
- QUIET=y
shift
-fi
-
-# Source files can specify their own flags with lines like
-#
-# /// _CFLAGS += -Wmissing-variable-declarations
-#
-# which will be added to the makefile on success, or lines like
-#
-# /// -Werror
-#
-# which are just used for the current file.
-EXTRA_FLAGS=$(sed -n '\|^///|{s|^/// ||; s|[^=]*= ||; p;}' "$1")
-
-# Without -q, print the executed command for config.log
-if [ -z "$QUIET" ]; then
+else
set -x
fi
-$XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $EXTRA_FLAGS $XLDLIBS
+$XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $XLDLIBS