mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
now we support accumulative --with-cc-opt.
This commit is contained in:
12
util/configure
vendored
12
util/configure
vendored
@ -70,6 +70,7 @@ my $prefix = '/usr/local/openresty';
|
||||
my %resty_opts;
|
||||
my $dry_run;
|
||||
my @ngx_rpaths;
|
||||
my @ngx_cc_opts;
|
||||
|
||||
my @ngx_opts;
|
||||
for my $opt (@ARGV) {
|
||||
@ -87,6 +88,9 @@ for my $opt (@ARGV) {
|
||||
} elsif ($opt eq '--help') {
|
||||
usage 0;
|
||||
|
||||
} elsif ($opt =~ /^--with-cc-opt=(.*)/) {
|
||||
push @ngx_cc_opts, $1;
|
||||
|
||||
} elsif ($opt =~ $without_resty_mods_regex) {
|
||||
die "No $1\n";
|
||||
$resty_opts{"no_http_$1"} = 1;
|
||||
@ -205,11 +209,15 @@ sub build_resty_opts {
|
||||
my $opts_line = '';
|
||||
|
||||
if ($opts->{debug}) {
|
||||
$opts_line .= " \\\n --with-cc-opt='-O0' \\\n --with-debug";
|
||||
unshift @ngx_cc_opts, '-O0';
|
||||
$opts_line .= " \\\n --with-debug";
|
||||
|
||||
} else {
|
||||
$opts_line .= " \\\n --with-cc-opt='-O2'";
|
||||
unshift @ngx_cc_opts, '-O2';
|
||||
}
|
||||
|
||||
$opts_line .= " \\\n --with-cc-opt='@ngx_cc_opts'";
|
||||
|
||||
if (-d 'build') {
|
||||
system("rm -rf build");
|
||||
}
|
||||
|
Reference in New Issue
Block a user