1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/tools/llvm-objcopy/CMakeLists.txt
Seiya Nuta c44c8db652 Recommit "[llvm-objcopy][MachO] Support load commands used in executables/shared libraries"
Summary:
This patch implements copying some load commands that appear in executables/shared libraries such as the indirect symbol table.

I don't add tests intentionally because this patch is incomplete: we need a layout algorithm for executables/shared libraries. I'll submit it as a separate patch with tests.

Reviewers: alexshap, rupprecht, jhenderson, compnerd

Reviewed By: alexshap

Subscribers: abrachet, mgorny, mgrang, MaskRay, mtrent, jakehehrlich, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63395

llvm-svn: 369298
2019-08-19 21:05:31 +00:00

42 lines
899 B
CMake

set(LLVM_LINK_COMPONENTS
Object
Option
Support
MC
)
set(LLVM_TARGET_DEFINITIONS ObjcopyOpts.td)
tablegen(LLVM ObjcopyOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(ObjcopyOptsTableGen)
set(LLVM_TARGET_DEFINITIONS StripOpts.td)
tablegen(LLVM StripOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(StripOptsTableGen)
add_llvm_tool(llvm-objcopy
Buffer.cpp
CopyConfig.cpp
llvm-objcopy.cpp
COFF/COFFObjcopy.cpp
COFF/Object.cpp
COFF/Reader.cpp
COFF/Writer.cpp
ELF/ELFObjcopy.cpp
ELF/Object.cpp
MachO/MachOObjcopy.cpp
MachO/MachOReader.cpp
MachO/MachOWriter.cpp
MachO/MachOLayoutBuilder.cpp
MachO/Object.cpp
DEPENDS
ObjcopyOptsTableGen
StripOptsTableGen
)
add_llvm_tool_symlink(llvm-strip llvm-objcopy)
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
add_llvm_tool_symlink(objcopy llvm-objcopy)
add_llvm_tool_symlink(strip llvm-objcopy)
endif()