xref: /llvm-project/llvm/tools/opt/CMakeLists.txt (revision 5e80fc88f484b471ec61ac28894698a946c4fb89)
1set(LLVM_LINK_COMPONENTS
2  AllTargetsAsmParsers
3  AllTargetsCodeGens
4  AllTargetsDescs
5  AllTargetsInfos
6  AggressiveInstCombine
7  Analysis
8  AsmParser
9  BitWriter
10  CFGuard
11  CodeGen
12  Core
13  Coroutines
14  Extensions
15  IPO
16  IRReader
17  IRPrinter
18  InstCombine
19  Instrumentation
20  MC
21  ObjCARCOpts
22  Remarks
23  ScalarOpts
24  Support
25  Target
26  TargetParser
27  TransformUtils
28  Vectorize
29  Passes
30  )
31
32# We don't want to link this into libLLVM
33add_llvm_library(LLVMOptDriver
34  STATIC
35  NewPMDriver.cpp
36  optdriver.cpp
37  PARTIAL_SOURCES_INTENDED
38  DEPENDS
39  intrinsics_gen
40)
41
42add_llvm_tool(opt
43  PARTIAL_SOURCES_INTENDED
44  opt.cpp
45  DEPENDS
46  intrinsics_gen
47  SUPPORT_PLUGINS
48
49  EXPORT_SYMBOLS
50  )
51target_link_libraries(opt PRIVATE LLVMOptDriver)
52
53setup_host_tool(opt OPT opt_exe opt_target)
54