mirror of https://github.com/openssl/openssl
Configure: Make --strict-warnings meaningful with MSVC cl
We also add this to our x86_64 builds on appveyor Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10287)
This commit is contained in:
parent
181f5185ee
commit
b4a7b4ec4a
|
@ -1352,7 +1352,6 @@ my %targets = (
|
||||||
},
|
},
|
||||||
"VC-WIN32" => {
|
"VC-WIN32" => {
|
||||||
inherit_from => [ "VC-noCE-common" ],
|
inherit_from => [ "VC-noCE-common" ],
|
||||||
CFLAGS => add("/WX"),
|
|
||||||
AS => sub { vc_win32_info()->{AS} },
|
AS => sub { vc_win32_info()->{AS} },
|
||||||
ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
|
ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
|
||||||
asoutflag => sub { vc_win32_info()->{asoutflag} },
|
asoutflag => sub { vc_win32_info()->{asoutflag} },
|
||||||
|
|
23
Configure
23
Configure
|
@ -164,6 +164,10 @@ my @clang_devteam_warn = qw(
|
||||||
-Wmissing-variable-declarations
|
-Wmissing-variable-declarations
|
||||||
);
|
);
|
||||||
|
|
||||||
|
my @cl_devteam_warn = qw(
|
||||||
|
/WX
|
||||||
|
);
|
||||||
|
|
||||||
# This adds backtrace information to the memory leak info. Is only used
|
# This adds backtrace information to the memory leak info. Is only used
|
||||||
# when crypto-mdebug-backtrace is enabled.
|
# when crypto-mdebug-backtrace is enabled.
|
||||||
my $memleak_devteam_backtrace = "-rdynamic";
|
my $memleak_devteam_backtrace = "-rdynamic";
|
||||||
|
@ -1519,11 +1523,20 @@ if ($strict_warnings)
|
||||||
my $wopt;
|
my $wopt;
|
||||||
my $gccver = $predefined_C{__GNUC__} // -1;
|
my $gccver = $predefined_C{__GNUC__} // -1;
|
||||||
|
|
||||||
warn "WARNING --strict-warnings requires gcc[>=4] or gcc-alike"
|
if ($gccver >= 4)
|
||||||
unless $gccver >= 4;
|
{
|
||||||
push @strict_warnings_collection, @gcc_devteam_warn;
|
push @strict_warnings_collection, @gcc_devteam_warn;
|
||||||
push @strict_warnings_collection, @clang_devteam_warn
|
push @strict_warnings_collection, @clang_devteam_warn
|
||||||
if (defined($predefined_C{__clang__}));
|
if (defined($predefined_C{__clang__}));
|
||||||
|
}
|
||||||
|
elsif ($config{target} =~ /^VC-/)
|
||||||
|
{
|
||||||
|
push @strict_warnings_collection, @cl_devteam_warn;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
warn "WARNING --strict-warnings requires gcc[>=4] or gcc-alike, or MSVC"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) {
|
if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ before_build:
|
||||||
- ps: >-
|
- ps: >-
|
||||||
If ($env:Platform -Match "x86") {
|
If ($env:Platform -Match "x86") {
|
||||||
$env:VCVARS_PLATFORM="x86"
|
$env:VCVARS_PLATFORM="x86"
|
||||||
$env:TARGET="VC-WIN32 no-asm"
|
$env:TARGET="VC-WIN32 no-asm --strict-warnings"
|
||||||
} Else {
|
} Else {
|
||||||
$env:VCVARS_PLATFORM="amd64"
|
$env:VCVARS_PLATFORM="amd64"
|
||||||
$env:TARGET="VC-WIN64A-masm"
|
$env:TARGET="VC-WIN64A-masm"
|
||||||
|
|
Loading…
Reference in New Issue