<div dir="ltr"><div>The Windows bot is broken:<br></div><div><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3449">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3449</a><br></div><div><a href="https://llvm.org/bugs/show_bug.cgi?id=31565">https://llvm.org/bugs/show_bug.cgi?id=31565</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I guess you're already looking.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 5, 2017 at 6:33 PM, Rui Ueyama via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Thu Jan 5 20:33:53 2017<br>
New Revision: 291210<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=291210&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=291210&view=rev</a><br>
Log:<br>
Use TarWriter to create tar archives instead of cpio.<br>
<br>
This is how we use TarWriter in LLD. Now LLD does not append<br>
a file extension, so you need to pass `--reproduce foo.tar`<br>
instead of `--reproduce foo`.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D28103" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D28103</a><br>
<br>
Modified:<br>
lld/trunk/COFF/Driver.cpp<br>
lld/trunk/COFF/Driver.h<br>
lld/trunk/ELF/Driver.cpp<br>
lld/trunk/ELF/Driver.h<br>
lld/trunk/ELF/InputFiles.cpp<br>
lld/trunk/include/lld/Core/<wbr>Reproduce.h<br>
lld/trunk/lib/Core/Reproduce.<wbr>cpp<br>
lld/trunk/test/COFF/linkrepro.<wbr>test<br>
lld/trunk/test/ELF/reproduce-<wbr>backslash.s<br>
lld/trunk/test/ELF/reproduce-<wbr>error.s<br>
lld/trunk/test/ELF/reproduce-<wbr>linkerscript.s<br>
lld/trunk/test/ELF/reproduce-<wbr>thin-archive.s<br>
lld/trunk/test/ELF/reproduce-<wbr>windows.s<br>
lld/trunk/test/ELF/reproduce-<wbr>windows2.s<br>
lld/trunk/test/ELF/reproduce.s<br>
lld/trunk/test/lit.cfg<br>
<br>
Modified: lld/trunk/COFF/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/Driver.<wbr>cpp?rev=291210&r1=291209&r2=<wbr>291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Driver.cpp (original)<br>
+++ lld/trunk/COFF/Driver.cpp Thu Jan 5 20:33:53 2017<br>
@@ -25,6 +25,7 @@<br>
#include "llvm/Support/Debug.h"<br>
#include "llvm/Support/Path.h"<br>
#include "llvm/Support/Process.h"<br>
+#include "llvm/Support/TarWriter.h"<br>
#include "llvm/Support/TargetSelect.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <algorithm><br>
@@ -98,9 +99,9 @@ MemoryBufferRef LinkerDriver::takeBuffer<br>
MemoryBufferRef MBRef = *MB;<br>
OwningMBs.push_back(std::move(<wbr>MB));<br>
<br>
- if (Driver->Cpio)<br>
- Driver->Cpio->append(<wbr>relativeToRoot(MBRef.<wbr>getBufferIdentifier()),<br>
- MBRef.getBuffer());<br>
+ if (Driver->Tar)<br>
+ Driver->Tar->append(<wbr>relativeToRoot(MBRef.<wbr>getBufferIdentifier()),<br>
+ MBRef.getBuffer());<br>
<br>
return MBRef;<br>
}<br>
@@ -458,13 +459,17 @@ void LinkerDriver::link(ArrayRef<<wbr>const c<br>
<br>
if (auto *Arg = Args.getLastArg(OPT_linkrepro)<wbr>) {<br>
SmallString<64> Path = StringRef(Arg->getValue());<br>
- sys::path::append(Path, "repro");<br>
- ErrorOr<CpioFile *> F = CpioFile::create(Path);<br>
- if (F)<br>
- Cpio.reset(*F);<br>
- else<br>
- errs() << "/linkrepro: failed to open " << Path<br>
- << ".cpio: " << F.getError().message() << '\n';<br>
+ sys::path::append(Path, "repro.tar");<br>
+<br>
+ Expected<std::unique_ptr<<wbr>TarWriter>> ErrOrWriter =<br>
+ TarWriter::create(Path, "repro");<br>
+<br>
+ if (ErrOrWriter) {<br>
+ Tar = std::move(*ErrOrWriter);<br>
+ } else {<br>
+ errs() << "/linkrepro: failed to open " << Path << ": "<br>
+ << toString(ErrOrWriter.<wbr>takeError()) << '\n';<br>
+ }<br>
}<br>
<br>
if (Args.filtered_begin(OPT_<wbr>INPUT) == Args.filtered_end())<br>
@@ -683,10 +688,10 @@ void LinkerDriver::link(ArrayRef<<wbr>const c<br>
if (!Resources.empty())<br>
addBuffer(convertResToCOFF(<wbr>Resources));<br>
<br>
- if (Cpio)<br>
- Cpio->append("response.txt",<br>
- createResponseFile(Args, FilePaths,<br>
- ArrayRef<StringRef>(<wbr>SearchPaths).slice(1)));<br>
+ if (Tar)<br>
+ Tar->append("response.txt",<br>
+ createResponseFile(Args, FilePaths,<br>
+ ArrayRef<StringRef>(<wbr>SearchPaths).slice(1)));<br>
<br>
// Handle /largeaddressaware<br>
if (Config->is64() || Args.hasArg(OPT_<wbr>largeaddressaware))<br>
<br>
Modified: lld/trunk/COFF/Driver.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.h?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/COFF/Driver.<wbr>h?rev=291210&r1=291209&r2=<wbr>291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/Driver.h (original)<br>
+++ lld/trunk/COFF/Driver.h Thu Jan 5 20:33:53 2017<br>
@@ -20,6 +20,7 @@<br>
#include "llvm/Object/COFF.h"<br>
#include "llvm/Option/Arg.h"<br>
#include "llvm/Option/ArgList.h"<br>
+#include "llvm/Support/TarWriter.h"<br>
#include <memory><br>
#include <set><br>
#include <vector><br>
@@ -74,7 +75,7 @@ private:<br>
ArgParser Parser;<br>
SymbolTable Symtab;<br>
<br>
- std::unique_ptr<CpioFile> Cpio; // for /linkrepro<br>
+ std::unique_ptr<llvm::<wbr>TarWriter> Tar; // for /linkrepro<br>
<br>
// Opens a file. Path has to be resolved already.<br>
MemoryBufferRef openFile(StringRef Path);<br>
<br>
Modified: lld/trunk/ELF/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/Driver.<wbr>cpp?rev=291210&r1=291209&r2=<wbr>291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/Driver.cpp (original)<br>
+++ lld/trunk/ELF/Driver.cpp Thu Jan 5 20:33:53 2017<br>
@@ -25,6 +25,7 @@<br>
#include "llvm/ADT/StringExtras.h"<br>
#include "llvm/ADT/StringSwitch.h"<br>
#include "llvm/Support/CommandLine.h"<br>
+#include "llvm/Support/Path.h"<br>
#include "llvm/Support/TargetSelect.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <cstdlib><br>
@@ -182,8 +183,8 @@ Optional<MemoryBufferRef> LinkerDriver::<br>
MemoryBufferRef MBRef = MB->getMemBufferRef();<br>
make<std::unique_ptr<<wbr>MemoryBuffer>>(std::move(MB)); // take MB ownership<br>
<br>
- if (Cpio)<br>
- Cpio->append(relativeToRoot(<wbr>Path), MBRef.getBuffer());<br>
+ if (Tar)<br>
+ Tar->append(relativeToRoot(<wbr>Path), MBRef.getBuffer());<br>
<br>
return MBRef;<br>
}<br>
@@ -309,14 +310,16 @@ void LinkerDriver::main(ArrayRef<<wbr>const c<br>
if (const char *Path = getReproduceOption(Args)) {<br>
// Note that --reproduce is a debug option so you can ignore it<br>
// if you are trying to understand the whole picture of the code.<br>
- ErrorOr<CpioFile *> F = CpioFile::create(Path);<br>
- if (F) {<br>
- Cpio.reset(*F);<br>
- Cpio->append("response.txt", createResponseFile(Args));<br>
- Cpio->append("version.txt", getLLDVersion() + "\n");<br>
- } else<br>
- error(F.getError(),<br>
- Twine("--reproduce: failed to open ") + Path + ".cpio");<br>
+ Expected<std::unique_ptr<<wbr>TarWriter>> ErrOrWriter =<br>
+ TarWriter::create(Path, path::stem(Path));<br>
+ if (ErrOrWriter) {<br>
+ Tar = std::move(*ErrOrWriter);<br>
+ Tar->append("response.txt", createResponseFile(Args));<br>
+ Tar->append("version.txt", getLLDVersion() + "\n");<br>
+ } else {<br>
+ error(Twine("--reproduce: failed to open ") + Path + ": " +<br>
+ toString(ErrOrWriter.<wbr>takeError()));<br>
+ }<br>
}<br>
<br>
readConfigs(Args);<br>
<br>
Modified: lld/trunk/ELF/Driver.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.h?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/Driver.<wbr>h?rev=291210&r1=291209&r2=<wbr>291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/Driver.h (original)<br>
+++ lld/trunk/ELF/Driver.h Thu Jan 5 20:33:53 2017<br>
@@ -17,6 +17,7 @@<br>
#include "llvm/ADT/StringRef.h"<br>
#include "llvm/ADT/StringSet.h"<br>
#include "llvm/Option/ArgList.h"<br>
+#include "llvm/Support/TarWriter.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
<br>
namespace lld {<br>
@@ -29,7 +30,7 @@ public:<br>
void main(ArrayRef<const char *> Args, bool CanExitEarly);<br>
void addFile(StringRef Path);<br>
void addLibrary(StringRef Name);<br>
- std::unique_ptr<CpioFile> Cpio; // for reproduce<br>
+ std::unique_ptr<llvm::<wbr>TarWriter> Tar; // for reproduce<br>
<br>
private:<br>
std::vector<MemoryBufferRef> getArchiveMembers(<wbr>MemoryBufferRef MB);<br>
<br>
Modified: lld/trunk/ELF/InputFiles.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/<wbr>InputFiles.cpp?rev=291210&r1=<wbr>291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/InputFiles.cpp (original)<br>
+++ lld/trunk/ELF/InputFiles.cpp Thu Jan 5 20:33:53 2017<br>
@@ -525,9 +525,9 @@ ArchiveFile::getMember(const Archive::Sy<br>
"could not get the buffer for the member defining symbol " +<br>
Sym->getName());<br>
<br>
- if (C.getParent()->isThin() && Driver->Cpio)<br>
- Driver->Cpio->append(<wbr>relativeToRoot(check(C.<wbr>getFullName())),<br>
- Ret.getBuffer());<br>
+ if (C.getParent()->isThin() && Driver->Tar)<br>
+ Driver->Tar->append(<wbr>relativeToRoot(check(C.<wbr>getFullName())),<br>
+ Ret.getBuffer());<br>
if (C.getParent()->isThin())<br>
return {Ret, 0};<br>
return {Ret, C.getChildOffset()};<br>
<br>
Modified: lld/trunk/include/lld/Core/<wbr>Reproduce.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Reproduce.h?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/include/lld/<wbr>Core/Reproduce.h?rev=291210&<wbr>r1=291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/include/lld/Core/<wbr>Reproduce.h (original)<br>
+++ lld/trunk/include/lld/Core/<wbr>Reproduce.h Thu Jan 5 20:33:53 2017<br>
@@ -11,46 +11,15 @@<br>
#define LLD_CORE_REPRODUCE_H<br>
<br>
#include "lld/Core/LLVM.h"<br>
-#include "llvm/ADT/ArrayRef.h"<br>
#include "llvm/ADT/StringRef.h"<br>
-#include "llvm/ADT/StringSet.h"<br>
#include "llvm/Support/Error.h"<br>
<br>
namespace llvm {<br>
-<br>
-class raw_fd_ostream;<br>
-<br>
namespace opt { class Arg; }<br>
-<br>
}<br>
<br>
namespace lld {<br>
<br>
-// This class creates a .cpio file for --reproduce (ELF) or /linkrepro (COFF).<br>
-//<br>
-// If "--reproduce foo" is given, we create a file "foo.cpio" and<br>
-// copy all input files to the archive, along with a response file<br>
-// to re-run the same command with the same inputs.<br>
-// It is useful for reporting issues to LLD developers.<br>
-//<br>
-// Cpio as a file format is a deliberate choice. It's standardized in<br>
-// POSIX and very easy to create. cpio command is available virtually<br>
-// on all Unix systems. See<br>
-// <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_07" rel="noreferrer" target="_blank">http://pubs.opengroup.org/<wbr>onlinepubs/9699919799/<wbr>utilities/pax.html#tag_20_92_<wbr>13_07</a><br>
-// for the format details.<br>
-class CpioFile {<br>
-public:<br>
- static ErrorOr<CpioFile *> create(StringRef OutputPath);<br>
- void append(StringRef Path, StringRef Data);<br>
-<br>
-private:<br>
- CpioFile(std::unique_ptr<llvm:<wbr>:raw_fd_ostream> OS, StringRef Basename);<br>
-<br>
- std::unique_ptr<llvm::raw_fd_<wbr>ostream> OS;<br>
- llvm::StringSet<> Seen;<br>
- std::string Basename;<br>
-};<br>
-<br>
// Makes a given pathname an absolute path first, and then remove<br>
// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",<br>
// assuming that the current directory is "/home/john/bar".<br>
<br>
Modified: lld/trunk/lib/Core/Reproduce.<wbr>cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Reproduce.cpp?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/lib/Core/<wbr>Reproduce.cpp?rev=291210&r1=<wbr>291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/lib/Core/Reproduce.<wbr>cpp (original)<br>
+++ lld/trunk/lib/Core/Reproduce.<wbr>cpp Thu Jan 5 20:33:53 2017<br>
@@ -8,66 +8,14 @@<br>
//===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
<br>
#include "lld/Core/Reproduce.h"<br>
-#include "llvm/ADT/STLExtras.h"<br>
-#include "llvm/ADT/Twine.h"<br>
#include "llvm/Option/Arg.h"<br>
#include "llvm/Support/Error.h"<br>
#include "llvm/Support/FileSystem.h"<br>
-#include "llvm/Support/Format.h"<br>
#include "llvm/Support/Path.h"<br>
<br>
using namespace lld;<br>
using namespace llvm;<br>
-using namespace sys;<br>
-<br>
-CpioFile::CpioFile(std::<wbr>unique_ptr<raw_fd_ostream> OS, StringRef S)<br>
- : OS(std::move(OS)), Basename(S) {}<br>
-<br>
-ErrorOr<CpioFile *> CpioFile::create(StringRef OutputPath) {<br>
- std::string Path = (OutputPath + ".cpio").str();<br>
- std::error_code EC;<br>
- auto OS = llvm::make_unique<raw_fd_<wbr>ostream>(Path, EC, sys::fs::F_None);<br>
- if (EC)<br>
- return EC;<br>
- return new CpioFile(std::move(OS), path::filename(OutputPath));<br>
-}<br>
-<br>
-static void writeMember(raw_fd_ostream &OS, StringRef Path, StringRef Data) {<br>
- // The c_dev/c_ino pair should be unique according to the spec,<br>
- // but no one seems to care.<br>
- OS << "070707"; // c_magic<br>
- OS << "000000"; // c_dev<br>
- OS << "000000"; // c_ino<br>
- OS << "100664"; // c_mode: C_ISREG | rw-rw-r--<br>
- OS << "000000"; // c_uid<br>
- OS << "000000"; // c_gid<br>
- OS << "000001"; // c_nlink<br>
- OS << "000000"; // c_rdev<br>
- OS << "00000000000"; // c_mtime<br>
- OS << format("%06o", Path.size() + 1); // c_namesize<br>
- OS << format("%011o", Data.size()); // c_filesize<br>
- OS << Path << '\0'; // c_name<br>
- OS << Data; // c_filedata<br>
-}<br>
-<br>
-void CpioFile::append(StringRef Path, StringRef Data) {<br>
- if (!Seen.insert(Path).second)<br>
- return;<br>
-<br>
- // Construct an in-archive filename so that /home/foo/bar is stored<br>
- // as baz/home/foo/bar where baz is the basename of the output file.<br>
- // (i.e. in that case we are creating baz.cpio.)<br>
- SmallString<128> Fullpath;<br>
- path::append(Fullpath, Basename, Path);<br>
-<br>
- writeMember(*OS, convertToUnixPathSeparator(<wbr>Fullpath), Data);<br>
-<br>
- // Print the trailer and seek back.<br>
- // This way we have a valid archive if we crash.<br>
- uint64_t Pos = OS->tell();<br>
- writeMember(*OS, "TRAILER!!!", "");<br>
- OS->seek(Pos);<br>
-}<br>
+using namespace llvm::sys;<br>
<br>
// Makes a given pathname an absolute path first, and then remove<br>
// beginning /. For example, "../foo.o" is converted to "home/john/foo.o",<br>
@@ -76,7 +24,7 @@ void CpioFile::append(StringRef Path, St<br>
// a mess with backslash-as-escape and backslash-as-path-separator.<br>
std::string lld::relativeToRoot(StringRef Path) {<br>
SmallString<128> Abs = Path;<br>
- if (sys::fs::make_absolute(Abs))<br>
+ if (fs::make_absolute(Abs))<br>
return Path;<br>
path::remove_dots(Abs, /*remove_dot_dot=*/true);<br>
<br>
<br>
Modified: lld/trunk/test/COFF/linkrepro.<wbr>test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/linkrepro.test?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/COFF/<wbr>linkrepro.test?rev=291210&r1=<wbr>291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/COFF/linkrepro.<wbr>test (original)<br>
+++ lld/trunk/test/COFF/linkrepro.<wbr>test Thu Jan 5 20:33:53 2017<br>
@@ -1,6 +1,3 @@<br>
-# cpio fails on windows with "Function not implemented".<br>
-# REQUIRES: shell<br>
-<br>
# RUN: rm -rf %t.dir<br>
# RUN: mkdir -p %t.dir/build1 %t.dir/build2 %t.dir/build3<br>
# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj<br>
@@ -8,7 +5,7 @@<br>
# RUN: cd %t.dir/build1<br>
# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console \<br>
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff %t.obj repro/%:t.obj<br>
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib<br>
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt<br>
@@ -16,7 +13,7 @@<br>
# RUN: cd %t.dir/build2<br>
# RUN: lld-link %t.obj /libpath:%p/Inputs /defaultlib:std32 /subsystem:console \<br>
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff %t.obj repro/%:t.obj<br>
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib<br>
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt<br>
@@ -24,7 +21,7 @@<br>
# RUN: cd %t.dir/build3<br>
# RUN: env LIB=%p/Inputs lld-link %t.obj /defaultlib:std32 /subsystem:console \<br>
# RUN: /entry:main@0 /linkrepro:. /out:%t.exe<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff %t.obj repro/%:t.obj<br>
# RUN: diff %p/Inputs/std32.lib repro/%:p/Inputs/std32.lib<br>
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>backslash.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-backslash.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-backslash.s?rev=<wbr>291210&r1=291209&r2=291210&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>backslash.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>backslash.s Thu Jan 5 20:33:53 2017<br>
@@ -1,9 +1,9 @@<br>
-# REQUIRES: x86, cpio, shell<br>
+# REQUIRES: x86, shell<br>
<br>
# Test that we don't erroneously replace \ with / on UNIX, as it's<br>
# legal for a filename to contain backslashes.<br>
# RUN: llvm-mc %s -o foo\\.o -filetype=obj -triple=x86_64-pc-linux<br>
# RUN: ld.lld foo\\.o --reproduce repro<br>
-# RUN: cpio -it < repro.cpio | FileCheck %s<br>
+# RUN: tar tf repro.tar | FileCheck %s<br>
<br>
-# CHECK: repro/{{.*}}/foo\.o<br>
+# CHECK: repro/{{.*}}/foo\\.o<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>error.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-error.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-error.s?rev=291210&<wbr>r1=291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>error.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>error.s Thu Jan 5 20:33:53 2017<br>
@@ -1,15 +1,14 @@<br>
-# Extracting the cpio archive can get over the path limit on windows.<br>
+# Extracting the tar archive can get over the path limit on windows.<br>
# REQUIRES: shell<br>
<br>
# RUN: rm -rf %t.dir<br>
# RUN: mkdir -p %t.dir<br>
# RUN: cd %t.dir<br>
<br>
-# RUN: not ld.lld --reproduce repro abc -o t 2>&1 | FileCheck %s<br>
+# RUN: not ld.lld --reproduce repro.tar abc -o t 2>&1 | FileCheck %s<br>
# CHECK: cannot open abc: {{N|n}}o such file or directory<br>
<br>
-# RUN: grep TRAILER repro.cpio<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: tar xf repro.tar<br>
# RUN: FileCheck --check-prefix=RSP %s < repro/response.txt<br>
# RSP: abc<br>
# RSP: -o t<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>linkerscript.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-linkerscript.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-linkerscript.s?rev=<wbr>291210&r1=291209&r2=291210&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>linkerscript.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>linkerscript.s Thu Jan 5 20:33:53 2017<br>
@@ -5,8 +5,8 @@<br>
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build/foo.o<br>
# RUN: echo "INPUT(\"%t.dir/build/foo.o\")<wbr>" > %t.dir/build/foo.script<br>
# RUN: cd %t.dir<br>
-# RUN: ld.lld build/foo.script -o bar --reproduce repro<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: ld.lld build/foo.script -o bar --reproduce repro.tar<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff build/foo.script repro/%:t.dir/build/foo.script<br>
# RUN: diff build/foo.o repro/%:t.dir/build/foo.o<br>
<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>thin-archive.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-thin-archive.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-thin-archive.s?rev=<wbr>291210&r1=291209&r2=291210&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>thin-archive.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>thin-archive.s Thu Jan 5 20:33:53 2017<br>
@@ -5,8 +5,8 @@<br>
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.dir/foo.o<br>
# RUN: cd %t.dir<br>
# RUN: llvm-ar --format=gnu rcT foo.a foo.o<br>
-# RUN: ld.lld -m elf_x86_64 foo.a -o bar --reproduce repro<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: ld.lld -m elf_x86_64 foo.a -o bar --reproduce repro.tar<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff foo.a repro/%:t.dir/foo.a<br>
# RUN: diff foo.o repro/%:t.dir/foo.o<br>
<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>windows.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-windows.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-windows.s?rev=<wbr>291210&r1=291209&r2=291210&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>windows.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>windows.s Thu Jan 5 20:33:53 2017<br>
@@ -1,12 +1,12 @@<br>
-# REQUIRES: x86, cpio<br>
+# REQUIRES: x86<br>
<br>
# Test that a repro archive always uses / instead of \.<br>
# RUN: rm -rf %t.dir<br>
# RUN: mkdir -p %t.dir/build<br>
# RUN: llvm-mc %s -o %t.dir/build/foo.o -filetype=obj -triple=x86_64-pc-linux<br>
# RUN: cd %t.dir<br>
-# RUN: ld.lld build/foo.o --reproduce repro<br>
-# RUN: cpio -it < repro.cpio | FileCheck %s<br>
+# RUN: ld.lld build/foo.o --reproduce repro.tar<br>
+# RUN: tar tf repro.tar | FileCheck %s<br>
<br>
# CHECK: repro/response.txt<br>
# CHECK: repro/{{.*}}/build/foo.o<br>
<br>
Modified: lld/trunk/test/ELF/reproduce-<wbr>windows2.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce-windows2.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce-windows2.s?rev=<wbr>291210&r1=291209&r2=291210&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce-<wbr>windows2.s (original)<br>
+++ lld/trunk/test/ELF/reproduce-<wbr>windows2.s Thu Jan 5 20:33:53 2017<br>
@@ -1,4 +1,4 @@<br>
-# REQUIRES: system-windows, x86, cpio<br>
+# REQUIRES: system-windows, x86<br>
<br>
# Test that a response.txt file always uses / instead of \.<br>
# RUN: rm -rf %t.dir<br>
@@ -6,6 +6,5 @@<br>
# RUN: llvm-mc %s -o %t.dir/build/foo.o -filetype=obj -triple=x86_64-pc-linux<br>
# RUN: cd %t.dir<br>
# RUN: ld.lld build/foo.o --reproduce repro<br>
-# RUN: echo "*response.txt" > list.txt<br>
-# RUN: cpio -i --to-stdout --pattern-file=list.txt < repro.cpio | FileCheck %s<br>
+# RUN: tar -O -x -f repro.tar repro/response.txt | FileCheck %s<br>
# CHECK: {{.*}}/build/foo.o<br>
<br>
Modified: lld/trunk/test/ELF/reproduce.s<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce.s?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/ELF/<wbr>reproduce.s?rev=291210&r1=<wbr>291209&r2=291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/ELF/reproduce.s (original)<br>
+++ lld/trunk/test/ELF/reproduce.s Thu Jan 5 20:33:53 2017<br>
@@ -1,14 +1,14 @@<br>
-# REQUIRES: x86, cpio<br>
+# REQUIRES: x86<br>
<br>
-# Extracting the cpio archive can get over the path limit on windows.<br>
+# Extracting the tar archive can get over the path limit on windows.<br>
# REQUIRES: shell<br>
<br>
# RUN: rm -rf %t.dir<br>
# RUN: mkdir -p %t.dir/build1<br>
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build1/foo.o<br>
# RUN: cd %t.dir<br>
-# RUN: ld.lld --hash-style=gnu build1/foo.o -o bar -shared --as-needed --reproduce repro<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: ld.lld --hash-style=gnu build1/foo.o -o bar -shared --as-needed --reproduce repro.tar<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff build1/foo.o repro/%:t.dir/build1/foo.o<br>
<br>
# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt<br>
@@ -25,8 +25,8 @@<br>
# RUN: mkdir -p %t.dir/build2/a/b/c<br>
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build2/foo.o<br>
# RUN: cd %t.dir/build2/a/b/c<br>
-# RUN: env LLD_REPRODUCE=repro ld.lld ./../../../foo.o -o bar -shared --as-needed<br>
-# RUN: cpio -id < repro.cpio<br>
+# RUN: env LLD_REPRODUCE=repro.tar ld.lld ./../../../foo.o -o bar -shared --as-needed<br>
+# RUN: tar xf repro.tar<br>
# RUN: diff %t.dir/build2/foo.o repro/%:t.dir/build2/foo.o<br>
<br>
# RUN: echo "{ local: *; };" > ver<br>
@@ -34,10 +34,10 @@<br>
# RUN: echo > file<br>
# RUN: echo > file2<br>
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o 'foo bar'<br>
-# RUN: ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile -Tfile2 \<br>
+# RUN: ld.lld --reproduce repro2.tar 'foo bar' -L"foo bar" -Lfile -Tfile2 \<br>
# RUN: --dynamic-list dyn -rpath file --script=file --version-script ver \<br>
# RUN: --dynamic-linker "some unusual/path" -soname 'foo bar' -soname='foo bar'<br>
-# RUN: cpio -id < repro2.cpio<br>
+# RUN: tar xf repro2.tar<br>
# RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt<br>
# RSP2: "{{.*}}foo bar"<br>
# RSP2-NEXT: -L "{{.*}}foo bar"<br>
@@ -51,7 +51,7 @@<br>
# RSP2-NEXT: -soname="foo bar"<br>
# RSP2-NEXT: -soname="foo bar"<br>
<br>
-# RUN: cpio -it < repro2.cpio | FileCheck %s<br>
+# RUN: tar tf repro2.tar | FileCheck %s<br>
# CHECK: repro2/response.txt<br>
# CHECK-NEXT: repro2/version.txt<br>
# CHECK-NEXT: repro2/{{.*}}/dyn<br>
<br>
Modified: lld/trunk/test/lit.cfg<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=291210&r1=291209&r2=291210&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/test/lit.<wbr>cfg?rev=291210&r1=291209&r2=<wbr>291210&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/test/lit.cfg (original)<br>
+++ lld/trunk/test/lit.cfg Thu Jan 5 20:33:53 2017<br>
@@ -258,7 +258,3 @@ cvtres = lit.util.which('cvtres', config<br>
rc = lit.util.which('rc', config.environment['PATH'])<br>
if cvtres and rc:<br>
config.available_features.add(<wbr>'winres')<br>
-<br>
-# Check if "cpio" command exists.<br>
-if lit.util.which('cpio', config.environment['PATH']):<br>
- config.available_features.add(<wbr>'cpio')<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>