1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/tools/opt/CMakeLists.txt
Eli Friedman 45e4a653e4 Don't export symbols from clang/opt/llc if plugins are disabled.
The only reason we export symbols from these tools is to support
plugins; if we don't have plugins, exporting symbols just bloats the
executable and makes LTO less effective.

See review of D75879 for the discussion that led to this patch.

Differential Revision: https://reviews.llvm.org/D76527
2020-03-23 12:17:09 -07:00

47 lines
704 B
CMake

set(LLVM_LINK_COMPONENTS
AllTargetsAsmParsers
AllTargetsCodeGens
AllTargetsDescs
AllTargetsInfos
AggressiveInstCombine
Analysis
BitWriter
CodeGen
Core
Coroutines
IPO
IRReader
InstCombine
Instrumentation
MC
ObjCARCOpts
Remarks
ScalarOpts
Support
Target
TransformUtils
Vectorize
Passes
)
add_llvm_tool(opt
AnalysisWrappers.cpp
BreakpointPrinter.cpp
GraphPrinters.cpp
NewPMDriver.cpp
PassPrinters.cpp
PrintSCC.cpp
opt.cpp
ENABLE_PLUGINS
DEPENDS
intrinsics_gen
SUPPORT_PLUGINS
)
export_executable_symbols_for_plugins(opt)
if(LLVM_BUILD_EXAMPLES)
target_link_libraries(opt PRIVATE ExampleIRTransforms)
endif(LLVM_BUILD_EXAMPLES)