-
Notifications
You must be signed in to change notification settings - Fork 203
/
BuildParam.pm
46 lines (37 loc) · 1.55 KB
/
BuildParam.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
####################################################################################################################################
# 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;