[PATCH] D59127: [CMake] Support stripping and linking output to .build-id directory

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 12:59:35 PST 2019


jakehehrlich accepted this revision.
jakehehrlich added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/runtimes/llvm-strip-link.in:14
+    if buf != ELF_MAGIC:
+        sys.exit(0)
+
----------------
phosek wrote:
> @jakehehrlich `llvm-objcopy` complains when you give it unrecognized file as an input, in our case it's `libc++.so` which is a linker script. Is there a better way to do this?
No this is the best way I can think to do it. If a file starts with the elf magic it's highly unlikely to be anything else, and certainly it won't be a linker script so I think this is good.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59127/new/

https://reviews.llvm.org/D59127





More information about the llvm-commits mailing list