mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 03:46:06 +00:00

The clang-analyzer plugins are not linked to a particular tool, so they can only be compiled if plugins are broadly supported. We could opt instead to decide whether to link them to specifically against clang or with undefined symbols, depending on the value of LLVM_ENABLE_PLUGINS, but we do not currently expect there to be a use case for that rather niche configuration. Differential Revision: https://reviews.llvm.org/D119591
24 lines
658 B
CMake
24 lines
658 B
CMake
# If we don't need RTTI or EH, there's no reason to export anything
|
|
# from the plugin.
|
|
if( NOT MSVC ) # MSVC mangles symbols differently, and
|
|
# PrintFunctionNames.export contains C++ symbols.
|
|
if( NOT LLVM_REQUIRES_RTTI )
|
|
if( NOT LLVM_REQUIRES_EH )
|
|
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/PrintFunctionNames.exports)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
add_llvm_library(PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang)
|
|
|
|
if(WIN32 OR CYGWIN)
|
|
set(LLVM_LINK_COMPONENTS
|
|
Support
|
|
)
|
|
clang_target_link_libraries(PrintFunctionNames PRIVATE
|
|
clangAST
|
|
clangBasic
|
|
clangFrontend
|
|
)
|
|
endif()
|