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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 23:22:00 PST 2019


phosek marked 2 inline comments as done.
phosek added inline comments.


================
Comment at: llvm/runtimes/CMakeLists.txt:455
                              TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip
+                             USE_STRIP ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link
                              EXTRA_TARGETS ${${name}_extra_targets}
----------------
We should probably only enable this for ELF targets since that's the only one that currently supports the `.build-id` scheme.


================
Comment at: llvm/runtimes/llvm-strip-link.in:14
+    if buf != ELF_MAGIC:
+        sys.exit(0)
+
----------------
@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?


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