feature: passed C compiler option -g by default for statically linked openssl, pcre, and zlib libraries to enable debuginfo.

This commit is contained in:
lijunlong
2020-06-05 18:11:26 +08:00
committed by Yichun Zhang (agentzh)
parent fc17ac5bc2
commit 61f6ecb419
2 changed files with 27 additions and 12 deletions

15
util/configure vendored
View File

@ -25,6 +25,9 @@ my $OS = $^O;
my ($ngx_dir, $lualib_prefix);
my %with_ext_lib;
my %with_ext_lib_opts;
for my $opt (@ARGV) {
if ($opt =~ /^--platform=(.*)/) {
$OS = $1;
@ -346,6 +349,12 @@ for my $opt (@ARGV) {
}
$path = File::Spec->rel2abs($path);
push @ngx_opts, "--with-$lib=$path";
$with_ext_lib{$lib} = 1;
} elsif ($opt =~ /^--with-(openssl|pcre|zlib)-opt=(.*)/) {
my ($lib, $opt) = ($1, $2);
push @ngx_opts, "--with-$lib-opt=-g $opt";
$with_ext_lib_opts{$lib} = 1;
} elsif ($opt =~ /^--sbin-path=(.*)/) {
$ngx_sbin = $1;
@ -359,6 +368,12 @@ for my $opt (@ARGV) {
}
}
for my $lib (qw/openssl pcre zlib/) {
if ($with_ext_lib{$lib} && !$with_ext_lib_opts{$lib}) {
push @ngx_opts, "--with-$lib-opt=-g";
}
}
if ($platform eq 'msys') {
$resty_opts{no_lua_resty_signal} = 1;
$resty_opts{no_lua_resty_shell} = 1;