1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/tools/llvm-objcopy/CMakeLists.txt
Alexander Shaposhnikov a6c5914f99 [llvm-objcopy][MachO] Add llvm-bitcode-strip driver
This diff adds llvm-bitcode-strip driver to llvm-objcopy.
In the future this will enable us to build a replacement for the tool bitcode_strip.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87212
2020-09-18 18:13:05 -07:00

63 lines
1.6 KiB
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 InstallNameToolOpts.td)
tablegen(LLVM InstallNameToolOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(InstallNameToolOptsTableGen)
set(LLVM_TARGET_DEFINITIONS BitcodeStripOpts.td)
tablegen(LLVM BitcodeStripOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(BitcodeStripOptsTableGen)
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/ELFConfig.cpp
ELF/ELFObjcopy.cpp
ELF/Object.cpp
MachO/MachOObjcopy.cpp
MachO/MachOReader.cpp
MachO/MachOWriter.cpp
MachO/MachOLayoutBuilder.cpp
MachO/Object.cpp
wasm/Object.cpp
wasm/Reader.cpp
wasm/Writer.cpp
wasm/WasmObjcopy.cpp
DEPENDS
ObjcopyOptsTableGen
InstallNameToolOptsTableGen
StripOptsTableGen
)
add_llvm_tool_symlink(llvm-install-name-tool llvm-objcopy)
add_llvm_tool_symlink(llvm-bitcode-strip llvm-objcopy)
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()
if(LLVM_INSTALL_CCTOOLS_SYMLINKS)
add_llvm_tool_symlink(install_name_tool llvm-install-name-tool)
add_llvm_tool_symlink(bitcode_strip llvm-bitcode-strip)
endif()