Reland D78945 TarWriter: Only use 137 of the 155 prefix bytes.
authorFangrui Song <maskray@google.com>
Mon, 27 Apr 2020 17:00:23 +0000 (13:00 -0400)
committerFangrui Song <maskray@google.com>
Mon, 27 Apr 2020 17:37:23 +0000 (10:37 -0700)
commit4687b454339b9072e15df55e52ae8bc2a266225d
tree3615437f209f1d7f6564919ce827e8ee42431833
parent5eff75d86a4fc72e70ee29599e32778a0e534ca5
Reland D78945 TarWriter: Only use 137 of the 155 prefix bytes.

With a fix to unittests/Support/TarWriterTest.cpp

This makes lld's --reproduce output more compatible with tar 1.13 and
before.  This is a very old version of tar, but it's the version in
both gnuwin and unxutils, and the cost for supporting them are very
low, so we might as well just do that.

https://bugs.chromium.org/p/chromium/issues/detail?id=1073524#c21
and onward has more details.

Differential Revision: https://reviews.llvm.org/D78945
llvm/lib/Support/TarWriter.cpp
llvm/unittests/Support/TarWriterTest.cpp