Generalize delimiter in archiver response file
authorTanzinul Islam <tanzinul.islam@gmail.com>
Sat, 7 Nov 2020 20:49:47 +0000 (20:49 +0000)
committerDmitry Belyavskiy <beldmit@gmail.com>
Mon, 19 Apr 2021 09:05:54 +0000 (11:05 +0200)
While [`lib.exe` of MSVC][1] expects newline-delimited response file
lines, [`tlib.exe` of C++Builder][2] expects lines to end with `&` in
order to read the next line.

[1]: https://docs.microsoft.com/cpp/build/reference/running-lib?view=msvc-160#lib-command-files
[2]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/TLIB.EXE,_the_Library_Manager#Response_Files

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/13540)

Configurations/10-main.conf
Configurations/windows-makefile.tmpl

index f8509feb39c5517ba40d7e03d9e568ede1f1c319..fbab220360404f96e21accb2733aaf3319b12ad9 100644 (file)
@@ -1284,6 +1284,7 @@ my %targets = (
         AR               => "lib",
         ARFLAGS          => "/nologo",
         aroutflag        => "/out:",
+        ar_resp_delim    => "\n",
         defines          => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
                                 "UNICODE", "_UNICODE",
                                 "_CRT_SECURE_NO_DEPRECATE",
index b6fd9149c0b556b2d10ae57e7496e77c7dc66b1d..5d1d77b3d2481796ce147a757ac75682e921cf6b 100644 (file)
@@ -909,7 +909,7 @@ EOF
      my %args = @_;
      my $lib = platform->staticlib($args{lib});
      my @objs = map { platform->obj($_) } @{$args{objs}};
-     my $objs = join("\n", @objs);
+     my $objs = join($target{ar_resp_delim}, @objs);
      my $deps = join(" ", @objs);
      return <<"EOF";
 $lib: $deps