mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:36:42 +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.
18 lines
624 B
CMake
18 lines
624 B
CMake
# The plugin expects to not link against the Support and Core libraries,
|
|
# but expects them to exist in the process loading the plugin. This doesn't
|
|
# work with DLLs on Windows (where a shared library can't have undefined
|
|
# references), so just skip this testcase on Windows.
|
|
if (NOT WIN32 AND NOT CYGWIN)
|
|
set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
|
|
add_llvm_unittest(PluginsTests
|
|
PluginsTest.cpp
|
|
|
|
EXPORT_SYMBOLS_FOR_PLUGINS
|
|
)
|
|
target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
|
|
|
|
unset(LLVM_LINK_COMPONENTS)
|
|
add_subdirectory(TestPlugin)
|
|
add_subdirectory(DoublerPlugin)
|
|
endif()
|