Jeremy Kerr | b2ef62b | 2019-05-28 09:38:25 +0800 | [diff] [blame] | 1 | #!/bin/sh |
Andrew Jeffery | 95a8a44 | 2020-03-10 22:09:02 +1030 | [diff] [blame^] | 2 | |
3 | set -eu | ||||
4 | |||||
5 | autoreconf -f -i | ||||
6 | |||||
7 | |||||
8 | BOOTSTRAP_MODE="" | ||||
9 | |||||
10 | if [ $# -gt 0 ]; | ||||
11 | then | ||||
12 | BOOTSTRAP_MODE="${1}" | ||||
13 | shift 1 | ||||
14 | fi | ||||
15 | |||||
16 | case "${BOOTSTRAP_MODE}" in | ||||
17 | dev) | ||||
18 | FLAGS="-fsanitize=address,leak,undefined -Wformat -Werror=format-security -Werror=array-bounds -ggdb" | ||||
19 | ./configure \ | ||||
20 | CFLAGS="${FLAGS}" \ | ||||
21 | CXXFLAGS="${FLAGS}" \ | ||||
22 | --enable-code-coverage \ | ||||
23 | "$@" | ||||
24 | ;; | ||||
25 | *) | ||||
26 | echo 'Run "./configure ${CONFIGURE_FLAGS} && make"' | ||||
27 | ;; | ||||
28 | esac |