This avoids linking in extra copies of, say, LLVMSupport.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201256
91177308-0d34-0410-b5e6-
96231b3b80d8
-set( LLVM_LINK_COMPONENTS
- Support
- )
-
# If we don't need RTTI or EH, there's no reason to export anything
# from the plugin.
if( NOT WIN32 ) # Win32 mangles symbols differently, and
endif()
endif()
-add_clang_library(PrintFunctionNames MODULE PrintFunctionNames.cpp)
+add_llvm_loadable_module(PrintFunctionNames PrintFunctionNames.cpp)
add_dependencies(PrintFunctionNames
ClangAttrClasses
ClangDiagnosticCommon
ClangStmtNodes
)
-
-target_link_libraries(PrintFunctionNames
- clangAST
- clangBasic
- clangFrontend
- )
-
-set_target_properties(PrintFunctionNames
- PROPERTIES
- LINKER_LANGUAGE CXX
- PREFIX "")
endif
LINK_LIBS_IN_SHARED = 0
-SHARED_LIBRARY = 1
+LOADABLE_MODULE = 1
include $(CLANG_LEVEL)/Makefile
-set(LLVM_LINK_COMPONENTS
- Support
- )
-
-add_clang_library(SampleAnalyzerPlugin MODULE MainCallChecker.cpp)
+add_llvm_loadable_module(SampleAnalyzerPlugin MainCallChecker.cpp)
add_dependencies(SampleAnalyzerPlugin
ClangAttrClasses
ClangDeclNodes
ClangDiagnosticCommon
ClangStmtNodes
- )
-
-target_link_libraries(SampleAnalyzerPlugin
clangAST
clangAnalysis
clangStaticAnalyzerCore
)
-
-set_target_properties(SampleAnalyzerPlugin
- PROPERTIES
- LINKER_LANGUAGE CXX
- PREFIX "")