blob: cf2cd9b76e46e5c818088b0b073add6eaa7802bd [file] [log] [blame]
Jeremy Kerrb2ef62b2019-05-28 09:38:25 +08001#!/bin/sh
Andrew Jeffery95a8a442020-03-10 22:09:02 +10302
3set -eu
4
5autoreconf -f -i
6
Andrew Jeffery95a8a442020-03-10 22:09:02 +10307BOOTSTRAP_MODE=""
8
9if [ $# -gt 0 ];
10then
11 BOOTSTRAP_MODE="${1}"
12 shift 1
13fi
14
15case "${BOOTSTRAP_MODE}" in
16 dev)
Andrew Jefferyaa297622020-03-17 16:59:59 +103017 FLAGS="-Wformat -Werror=format-security"
18 FLAGS="${FLAGS} -Werror=array-bounds"
19 FLAGS="${FLAGS} -fsanitize=address,leak,undefined"
20 FLAGS="${FLAGS} -ggdb"
Andrew Jeffery95a8a442020-03-10 22:09:02 +103021 ./configure \
22 CFLAGS="${FLAGS}" \
Andrew Jeffery95a8a442020-03-10 22:09:02 +103023 --enable-code-coverage \
24 "$@"
25 ;;
26 *)
27 echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
28 ;;
29esac