[PATCH] D22418: COFF: Implement /reproduce flag.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 18:37:03 PDT 2016


pcc added inline comments.

================
Comment at: COFF/Options.td:37
@@ -36,2 +36,3 @@
 def pdb : P<"pdb", "PDB file path">;
+def reproduce : P<"reproduce", "Dump linker invocation and input files for debugging">;
 def section : P<"section", "Specify section attributes">;
----------------
compnerd wrote:
> I did try this.  It seems that I was mistaken and link does *always* populate the directory.  If it fails really early like in the command line parsing, it will only populate link.rsp, but it does populate it.  So, I think that the behaviour matches what we currently have in lld, and we should be able to use the same name.
Okay, this now uses the /linkrepro flag. We create a file named "repro.cpio" in the given directory.

================
Comment at: lib/Core/Reproduce.cpp:83
@@ +82,3 @@
+    return EC;
+  path::remove_dots(Abs, /*remove_dot_dot=*/true);
+
----------------
ruiu wrote:
> It seems that if getcwd (or equivalent) failed, the system is really broken and can't do anything sane. Should we just swallow an error and returns the original string in case of an error?
Seems reasonable enough to me, done.


https://reviews.llvm.org/D22418





More information about the llvm-commits mailing list