1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 16:09:25 +03:00
Files
pgbackrest/libc/build/lib/pgBackRestLibC/BuildParam.pm
David Steele 52bc073234 Add stack trace macros to all functions.
Low-level functions only include stack trace in test builds while higher-level functions ship with stack trace built-in. Stack traces include all parameters passed to the function but production builds only create the parameter list when the log level is set high enough, i.e. debug or trace depending on the function.
2018-05-18 11:57:32 -04:00

47 lines
1.5 KiB
Perl

####################################################################################################################################
# Parameters used by LibC builds
####################################################################################################################################
package pgBackRestLibC::BuildParam;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
####################################################################################################################################
# All CC params used for a debug build
####################################################################################################################################
sub buildParamCCDebug
{
return qw(
-Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered -Wno-missing-field-initializers
-o $@
-std=c99
-D_FILE_OFFSET_BITS=64
$(CFLAGS));
}
push @EXPORT, qw(buildParamCCDebug);
####################################################################################################################################
# All CC params used for a production build
####################################################################################################################################
sub buildParamCCAll
{
my @stryParams = buildParamCCDebug;
push(@stryParams, qw(
-DNDEBUG
-funroll-loops
-ftree-vectorize));
return @stryParams;
}
push @EXPORT, qw(buildParamCCAll);
1;