[PATCH] D68382: [MinGW] Add --reproduce option
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 00:28:57 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL373705: [MinGW] Add --reproduce option (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D68382?vs=222982&id=223155#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68382/new/
https://reviews.llvm.org/D68382
Files:
lld/trunk/MinGW/Driver.cpp
lld/trunk/MinGW/Options.td
lld/trunk/test/MinGW/driver.test
Index: lld/trunk/MinGW/Options.td
===================================================================
--- lld/trunk/MinGW/Options.td
+++ lld/trunk/MinGW/Options.td
@@ -63,6 +63,7 @@
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">;
Index: lld/trunk/MinGW/Driver.cpp
===================================================================
--- lld/trunk/MinGW/Driver.cpp
+++ lld/trunk/MinGW/Driver.cpp
@@ -216,6 +216,8 @@
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()));
Index: lld/trunk/test/MinGW/driver.test
===================================================================
--- lld/trunk/test/MinGW/driver.test
+++ lld/trunk/test/MinGW/driver.test
@@ -189,6 +189,9 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68382.223155.patch
Type: text/x-patch
Size: 1852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191004/6ce3b94d/attachment.bin>
More information about the llvm-commits
mailing list