mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 03:26:36 +00:00

Fix the builds with LLVM_TOOL_LLVM_DRIVER_BUILD enabled. LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES is not completely compatible with export_executable_symbols as the later will be ignored if the previous is set to NO. Fix the issue by passing if symbols need to be exported to llvm_add_exectuable so the link flag can be determined directly without calling export_executable_symbols_* later.
40 lines
697 B
CMake
40 lines
697 B
CMake
if ( LLVM_INCLUDE_UTILS )
|
|
add_subdirectory(llvm-jitlink-executor)
|
|
endif()
|
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
AllTargetsDescs
|
|
AllTargetsDisassemblers
|
|
AllTargetsInfos
|
|
BinaryFormat
|
|
ExecutionEngine
|
|
JITLink
|
|
MC
|
|
Object
|
|
OrcDebugging
|
|
OrcJIT
|
|
OrcShared
|
|
OrcTargetProcess
|
|
RuntimeDyld
|
|
Support
|
|
TargetParser
|
|
)
|
|
|
|
add_llvm_tool(llvm-jitlink
|
|
llvm-jitlink.cpp
|
|
llvm-jitlink-coff.cpp
|
|
llvm-jitlink-elf.cpp
|
|
llvm-jitlink-macho.cpp
|
|
llvm-jitlink-statistics.cpp
|
|
|
|
EXPORT_SYMBOLS
|
|
)
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
|
target_link_libraries(llvm-jitlink PRIVATE network)
|
|
endif()
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
|
target_link_libraries(llvm-jitlink PRIVATE socket)
|
|
endif()
|