[lld] r373705 - [MinGW] Add --reproduce option
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 00:27:45 PDT 2019
Author: ruiu
Date: Fri Oct 4 00:27:45 2019
New Revision: 373705
URL: http://llvm.org/viewvc/llvm-project?rev=373705&view=rev
Log:
[MinGW] Add --reproduce option
Differential Revision: https://reviews.llvm.org/D68382
Modified:
lld/trunk/MinGW/Driver.cpp
lld/trunk/MinGW/Options.td
lld/trunk/test/MinGW/driver.test
Modified: lld/trunk/MinGW/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Driver.cpp?rev=373705&r1=373704&r2=373705&view=diff
==============================================================================
--- lld/trunk/MinGW/Driver.cpp (original)
+++ lld/trunk/MinGW/Driver.cpp Fri Oct 4 00:27:45 2019
@@ -216,6 +216,8 @@ bool mingw::link(ArrayRef<const char *>
add("-base:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_map))
add("-lldmap:" + StringRef(a->getValue()));
+ if (auto *a = args.getLastArg(OPT_reproduce))
+ add("-reproduce:" + StringRef(a->getValue()));
if (auto *a = args.getLastArg(OPT_o))
add("-out:" + StringRef(a->getValue()));
Modified: lld/trunk/MinGW/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/MinGW/Options.td?rev=373705&r1=373704&r2=373705&view=diff
==============================================================================
--- lld/trunk/MinGW/Options.td (original)
+++ lld/trunk/MinGW/Options.td Fri Oct 4 00:27:45 2019
@@ -63,6 +63,7 @@ def strip_all: F<"strip-all">,
HelpText<"Omit all symbol information from the output binary">;
def strip_debug: F<"strip-debug">,
HelpText<"Omit all debug information, but keep symbol information">;
+defm reproduce: Eq<"reproduce", "Write a tar file containing input files and command line options to reproduce link">;
defm undefined: Eq<"undefined", "Include symbol in the link, if available">;
def whole_archive: F<"whole-archive">,
HelpText<"Include all object files for following archives">;
Modified: lld/trunk/test/MinGW/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/MinGW/driver.test?rev=373705&r1=373704&r2=373705&view=diff
==============================================================================
--- lld/trunk/test/MinGW/driver.test (original)
+++ lld/trunk/test/MinGW/driver.test Fri Oct 4 00:27:45 2019
@@ -189,6 +189,9 @@ UNDEFINED: -includeoptional:_foo -includ
RUN: ld.lld -### -m i386pep foo.o -Llibpath | FileCheck -check-prefix LIBPATH %s
LIBPATH: -libpath:libpath
+RUN: ld.lld -### -m i386pep foo.o --reproduce=foo.tar | FileCheck -check-prefix REPRO %s
+REPRO: -reproduce:foo.tar
+
RUN: ld.lld -### -m i386pep foo.o --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s
RUN: ld.lld -### -m i386pep foo.o --insert-timestamp --no-insert-timestamp | FileCheck -check-prefix NOTIMESTAMP %s
NOTIMESTAMP: -timestamp:0
More information about the llvm-commits
mailing list