<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 - When suffixed with a version, llvm-strip is no longer recognized as llvm-strip"
   href="https://bugs.llvm.org/show_bug.cgi?id=45271">45271</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>When suffixed with a version, llvm-strip is no longer recognized as llvm-strip
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </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-objcopy/strip
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>natechancellor@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>alexander.v.shaposhnikov@gmail.com, jake.h.ehrlich@gmail.com, jh7370.2008@my.bristol.ac.uk, llvm-bugs@lists.llvm.org, rupprecht@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Debian's apt.llvm.org symlinks all of the LLVM binaries from
/usr/lib/llvm-<num>/bin to /usr/bin/<tool_name>-<num> (e.g.
/usr/lib/llvm-11/bin/clang -> /usr/bin/clang-11) so that multiple versions of
clang can be installed and used at one time without stepping over each other.

After commit c54959c00d0 ("Introduce llvm-install-name-tool"), llvm-strip fails
to work in this configuration (as initially reported at
<a href="https://github.com/ClangBuiltLinux/linux/issues/940">https://github.com/ClangBuiltLinux/linux/issues/940</a>):

llvm-strip-11: error: unknown argument '-o'

This is because 'strip' is required to be the ending to the binary after this
change, whereas before the binary merely needed to contain 'strip'. I am not
familiar enough with LLVM data structures to try and fix this myself, hence
this report (maybe moving back to using sys::path::stem(...).contains(...)?).

Should you need to reproduce:

```
$ ln -s llvm-strip llvm-strip-11
$ echo | ./clang -c -x c - -o test.o
$ ./llvm-strip-11 -o test-stripped.o test.o
```</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>