mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
85ab1e7fe7
The MSVC linker won't produce a .lib file for an executable that doesn't export anything, and LLVM doesn't maintain dllexport annotations or .def files listing all C++ symbols. It also doesn't support exporting all symbols, like binutils ld. CMake 3.2 changed the Ninja generator to list both the .exe and .lib files as outputs of executable build targets. Ninja would always re-link executables with ENABLE_EXPORTS because the .lib output file was not present, and therefore the target was out of date. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232662 91177308-0d34-0410-b5e6-96231b3b80d8
44 lines
733 B
CMake
44 lines
733 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
Analysis
|
|
BitWriter
|
|
CodeGen
|
|
Core
|
|
IPA
|
|
IPO
|
|
IRReader
|
|
InstCombine
|
|
Instrumentation
|
|
MC
|
|
ObjCARCOpts
|
|
ScalarOpts
|
|
Support
|
|
Target
|
|
TransformUtils
|
|
Vectorize
|
|
Passes
|
|
)
|
|
|
|
# Support plugins.
|
|
set(LLVM_NO_DEAD_STRIP 1)
|
|
|
|
add_llvm_tool(opt
|
|
AnalysisWrappers.cpp
|
|
BreakpointPrinter.cpp
|
|
GraphPrinters.cpp
|
|
NewPMDriver.cpp
|
|
PassPrinters.cpp
|
|
PrintSCC.cpp
|
|
opt.cpp
|
|
)
|
|
export_executable_symbols(opt)
|
|
|
|
if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
|
|
target_link_libraries(opt Polly)
|
|
if(POLLY_LINK_LIBS)
|
|
foreach(lib ${POLLY_LINK_LIBS})
|
|
target_link_libraries(opt ${lib})
|
|
endforeach(lib)
|
|
endif(POLLY_LINK_LIBS)
|
|
endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
|