Diff options
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-development.sh13
-rwxr-xr-xtools/build-release.sh9
2 files changed, 5 insertions, 17 deletions
diff --git a/tools/build-development.sh b/tools/build-development.sh
index 79b9259..aaa9e71 100755
--- a/tools/build-development.sh
+++ b/tools/build-development.sh
@@ -1,13 +1,9 @@
#!/bin/sh
-# Build cgit for development and debugging. It compiles without optimisation
-# and with full debug information, holds the sources to git's DEVELOPER
-# warnings, and links in AddressSanitizer and UndefinedBehaviorSanitizer, so a
-# memory error or undefined behaviour stops the program where it happens. With
-# clang it also leaves a compilation database in build/compile_commands.json,
-# where a language server looks for one, and with ctags a tags file in
-# build/tags. The sanitizers make cgit slow, so the result is for testing and
-# debugging rather than serving.
+# Build cgit for development and debugging. The sanitizers stop the program at
+# a memory error or undefined behaviour, which makes it slow, so the result is
+# for testing rather than serving. With clang it also leaves a compilation
+# database in build/ for a language server, and with ctags a tags file there.
#
# Any arguments go on to make, the way Lua flags do where pkg-config cannot
# find Lua:
@@ -18,7 +14,6 @@
set -eu
-# Every make target below is written relative to the repository root.
cd "$(dirname "$0")/.."
# The build starts from clean so the bundled git objects pick up the same
diff --git a/tools/build-release.sh b/tools/build-release.sh
index ade979c..00fa089 100755
--- a/tools/build-release.sh
+++ b/tools/build-release.sh
@@ -27,7 +27,6 @@ lua)
;;
esac
-# Every make target below is written relative to the repository root.
cd "$(dirname "$0")/.."
CC=${CC:-cc}
@@ -75,13 +74,7 @@ LDFLAGS="-pie -Wl,-z,relro,-z,now -Wl,-z,noexecstack"
# These reach only the cgit objects, so git's own sources are not held to them.
# -Wformat-security is an error because a non-literal format with no arguments
-# is never intentional. -Wformat-nonliteral would catch the module-link shape,
-# a non-literal that does take arguments, but it also fires on va_list
-# forwarding and on local format constants, so it is left to manual runs when
-# touching anything that formats.
-#
-# make cgit CGIT_EXTRA_CFLAGS=-Wformat-nonliteral
-#
+# is never intentional.
CGIT_EXTRA_CFLAGS="-Wformat -Wformat-security -Werror=format-security"
# The build starts from clean so the bundled git objects pick up the same