33set -o nounset
44set -o errexit
55
6- NGINX_VERSION=1.14 .0
6+ NGINX_VERSION=1.16 .0
77
88DIR=$( pwd)
99BUILDDIR=$DIR /build
1010NGINX_DIR=nginx
11+ DEBUG_FLAGS=" -g -O0 -Wall -Werror -static-libasan -fsanitize=address -fsanitize=leak -fsanitize=undefined -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null"
1112
1213setup_local_directories () {
1314 if [ ! -d $BUILDDIR ]; then
@@ -36,13 +37,13 @@ install_nginx () {
3637 curl -s -L -O " http://nginx.org/download/nginx-$NGINX_VERSION .tar.gz"
3738 tar xzf " nginx-$NGINX_VERSION .tar.gz"
3839 pushd " nginx-$NGINX_VERSION " > /dev/null 2>&1
39- CFLAGS= " -g -O0 -Wall -Werror " ./configure \
40- --with-debug \
41- --prefix=$( pwd) /../../build/nginx \
42- --conf-path=conf/nginx.conf \
43- --error-log-path=logs/error.log \
44- --http-log-path=logs/access.log \
45- --add-module=../echo-nginx-module \
40+ ./configure \
41+ --with-debug \
42+ --prefix=$( pwd) /../../build/nginx \
43+ --conf-path=conf/nginx.conf \
44+ --error-log-path=logs/error.log \
45+ --http-log-path=logs/access.log \
46+ --add-module=../echo-nginx-module \
4647 --add-module=../..
4748 make
4849 make install
@@ -57,13 +58,15 @@ install_nginx () {
5758compile () {
5859 pushd " vendor" > /dev/null 2>&1
5960 pushd " nginx-$NGINX_VERSION " > /dev/null 2>&1
60- CFLAGS=" -g -O0 -Wall -Werror" ./configure \
61- --with-debug \
62- --prefix=$( pwd) /../../build/nginx \
63- --conf-path=conf/nginx.conf \
64- --error-log-path=logs/error.log \
65- --http-log-path=logs/access.log \
66- --add-module=../echo-nginx-module \
61+ ./configure \
62+ --with-debug \
63+ --with-threads \
64+ --with-ld-opt=" -lasan -lubsan -ldl" \
65+ --prefix=$( pwd) /../../build/nginx \
66+ --conf-path=conf/nginx.conf \
67+ --error-log-path=logs/error.log \
68+ --http-log-path=logs/access.log \
69+ --add-module=../echo-nginx-module \
6770 --add-module=../..
6871 make
6972 make install
0 commit comments