When configured "shared", don't build static libraries on Windows
authorRichard Levitte <levitte@openssl.org>
Thu, 10 Mar 2016 00:58:27 +0000 (01:58 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Mar 2016 01:51:50 +0000 (02:51 +0100)
The reason for this is that the static libraries and the DLL import
libraries are named the same on Windows.  When configured "shared",
the static libraries are unused anyway.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/windows-makefile.tmpl

index 77cc377fce1f81511ba2b9d8cd71c94ca639b79c..7b78f9f4d96ffd5a1a25ded7bcf2c5b88914f9f1 100644 (file)
@@ -298,6 +298,11 @@ $objs$linklibs \$(EX_LIBS)
 EOF
  }
  sub obj2lib {
+     # Because static libs and import libs are both named the same in native
+     # Windows, we can't have both.  We skip the static lib in that case,
+     # as the shared libs are what we use anyway.
+     return "" unless $disabled{"shared"};
+
      my %args = @_;
      my $lib = $args{lib};
      my $objs = join("\n", map { $_.$objext } @{$args{objs}});