From b1f221b06648ed798f941ff56f4f5c877981a9e0 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Fri, 4 Jul 2014 18:57:47 -0700 Subject: [PATCH] change: "./configure --with-debug" now also pass the extra C compiler options -DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC for ngx_lua. --- t/sanity.t | 5 +++++ util/configure | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/t/sanity.t b/t/sanity.t index e213ab7..560f396 100644 --- a/t/sanity.t +++ b/t/sanity.t @@ -297,6 +297,7 @@ cd .. cd nginx-1.7.2 ./configure --prefix=/usr/local/openresty/nginx \ --with-debug \ + --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' \ --add-module=../ngx_devel_kit-0.2.19 \ --add-module=../echo-nginx-module-0.54 \ --add-module=../xss-nginx-module-0.04 \ @@ -1417,6 +1418,7 @@ cd .. cd nginx-1.7.2 ./configure --prefix=/usr/local/openresty/nginx \ --with-debug \ + --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' \ --add-module=../ngx_devel_kit-0.2.19 \ --add-module=../echo-nginx-module-0.54 \ --add-module=../xss-nginx-module-0.04 \ @@ -1489,6 +1491,7 @@ cd .. cd nginx-1.7.2 ./configure --prefix=/usr/local/openresty/nginx \ --with-debug \ + --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' \ --add-module=../ngx_devel_kit-0.2.19 \ --add-module=../echo-nginx-module-0.54 \ --add-module=../xss-nginx-module-0.04 \ @@ -2388,6 +2391,7 @@ cd .. cd nginx-1.7.2 ./configure --prefix=/usr/local/openresty/nginx \ --with-debug \ + --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' \ --add-module=../ngx_devel_kit-0.2.19 \ --add-module=../echo-nginx-module-0.54 \ --add-module=../xss-nginx-module-0.04 \ @@ -3292,6 +3296,7 @@ cd .. cd nginx-1.7.2 ./configure --prefix=/usr/local/openresty/nginx \ --with-debug \ + --with-cc-opt='-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' \ --add-module=../ngx_devel_kit-0.2.19 \ --add-module=../echo-nginx-module-0.54 \ --add-module=../xss-nginx-module-0.04 \ diff --git a/util/configure b/util/configure index d111184..366963b 100755 --- a/util/configure +++ b/util/configure @@ -445,7 +445,7 @@ _END_ my $opts_line = ''; if ($opts->{debug}) { - #unshift @ngx_cc_opts, '-O0'; + unshift @ngx_cc_opts, '-DNGX_LUA_USE_ASSERT', '-DNGX_LUA_ABORT_AT_PANIC'; $opts_line .= " \\\n --with-debug"; } else {