<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Flatten names when converting from thin archive to regular archive"
   href="https://bugs.llvm.org/show_bug.cgi?id=39034">39034</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Flatten names when converting from thin archive to regular archive
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>llvm-ar
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In a regular archive, names are always stored as just the filename (e.g.
'bar.o'), whereas in thin archives, the path specified is stored (e.g.
'C:\Work\bar.o'). Converting from a thin archive to a regular archive with no
warning is dubious at best (GNU ar does not support it at all), since
forgetting a single 'T' is all that it takes, but assuming that we permit it,
we should probably flatten the paths to be in the regular archive style, so
that operations can be performed on them in the same way as if it had been a
regular archive all along:

C:\Work>touch test1.o
C:\Work>touch dir\test2.o
C:\Work>touch test3.o
C:\Work>llvm-ar rcT test.a .\test1.o
C:\Work>llvm-ar rT test.a TempWork\test2.o
C:\Work>llvm-ar r test.a test3.o # This silently converts it to a thin archive
C:\Work>llvm-ar t test.a
./test1.o
TempWork/test2.o
test3.o
C:\Work>llvm-ar x test.a test1.o test2.o
test1.o was not found
test2.o was not found</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>