Skip to content

When suffixed with a version, llvm-strip is no longer recognized as llvm-strip #44616

@nathanchance

Description

@nathanchance
Bugzilla Link 45271
Resolution FIXED
Resolved on Apr 13, 2020 13:24
Version 10.0
OS Windows NT
Blocks #44654
CC @alexshap,@zmodem,@MaskRay,@jh7370,@rupprecht
Fixed by commit(s) f2f96eb 50d7e5d

Extended Description

Debian's apt.llvm.org symlinks all of the LLVM binaries from /usr/lib/llvm-/bin to /usr/bin/<tool_name>- (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 c54959c ("Introduce llvm-install-name-tool"), llvm-strip fails to work in this configuration (as initially reported at ClangBuiltLinux/linux#940):

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions