summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-10-29 13:37:54 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-05 22:51:12 +0100
commit53a5e9b561d0cc1c1c9a7ab9b0dbc91dd5e3623a (patch)
tree4cd644f11d5b4cfd5b9caf009694140d4d7cb850 /Configure
parentf6483fc2db36fbfd622b6aff19d8ebfaa274c996 (diff)
Configure: Make --strict-warnings meaningful with MSVC cl
We also add this to our x86_64 builds on appveyor (cherry picked from commit b4a7b4ec4acc712b1f22a83966ac986b510f25d8) Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10365)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure23
1 files changed, 18 insertions, 5 deletions
diff --git a/Configure b/Configure
index 59313117f0..a6aae00fd4 100755
--- a/Configure
+++ b/Configure
@@ -160,6 +160,10 @@ my @clang_devteam_warn = qw(
-Wmissing-variable-declarations
);
+my @cl_devteam_warn = qw(
+ /WX
+);
+
# This adds backtrace information to the memory leak info. Is only used
# when crypto-mdebug-backtrace is enabled.
my $memleak_devteam_backtrace = "-rdynamic";
@@ -1523,11 +1527,20 @@ if ($strict_warnings)
my $wopt;
my $gccver = $predefined_C{__GNUC__} // -1;
- warn "WARNING --strict-warnings requires gcc[>=4] or gcc-alike"
- unless $gccver >= 4;
- push @strict_warnings_collection, @gcc_devteam_warn;
- push @strict_warnings_collection, @clang_devteam_warn
- if (defined($predefined_C{__clang__}));
+ if ($gccver >= 4)
+ {
+ push @strict_warnings_collection, @gcc_devteam_warn;
+ push @strict_warnings_collection, @clang_devteam_warn
+ 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}}) {