1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/tools/dsymutil/CMakeLists.txt
Jonas Devlieghere eff7a5bc7b [dsymutil] Tablegenify option parsing
This patch reimplements command line option parsing in dsymutil with
Tablegen and libOption. The main motivation for this change is to
prevent clashes with other cl::opt options defined in llvm. Although
it's a bit more heavyweight, it has some nice advantages such as no
global static initializers and better separation between the code and
the option definitions.

I also used this opportunity to improve how dsymutil deals with
incompatible options. Instead of having checks spread across the code,
everything is now grouped together in verifyOptions. The fact that the
options are no longer global means that we need to pass them around a
bit more, but I think it's worth the trade-off.

Differential revision: https://reviews.llvm.org/D68361

llvm-svn: 373622
2019-10-03 16:34:41 +00:00

41 lines
713 B
CMake

set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(DsymutilTableGen)
set(LLVM_LINK_COMPONENTS
AllTargetsAsmPrinters
AllTargetsCodeGens
AllTargetsDescs
AllTargetsInfos
AsmPrinter
DebugInfoDWARF
MC
Object
Option
Support
Target
)
add_llvm_tool(dsymutil
dsymutil.cpp
BinaryHolder.cpp
CFBundle.cpp
CompileUnit.cpp
DebugMap.cpp
DeclContext.cpp
DwarfLinker.cpp
DwarfStreamer.cpp
MachODebugMapParser.cpp
MachOUtils.cpp
NonRelocatableStringpool.cpp
SymbolMap.cpp
DEPENDS
intrinsics_gen
${tablegen_deps}
)
if(APPLE)
target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
endif(APPLE)