Skip to content

Commit 01b2c9e

Browse files
committed
examples/analyzer-plugin: hook up to build
This was never being compiled at all and was bitrotting as a result. Also compile SampleAnalyzerPlugin as a module, not a library, and fix a mistake with not passing the source files to add_clang_library(). llvm-svn: 150378
1 parent 04eadc4 commit 01b2c9e

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

clang/examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ if(NOT CLANG_BUILD_EXAMPLES)
22
set(EXCLUDE_FROM_ALL ON)
33
endif()
44

5+
add_subdirectory(analyzer-plugin)
56
add_subdirectory(clang-interpreter)
67
add_subdirectory(PrintFunctionNames)

clang/examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
CLANG_LEVEL := ..
1111

12-
PARALLEL_DIRS := clang-interpreter PrintFunctionNames
12+
PARALLEL_DIRS := analyzer-plugin clang-interpreter PrintFunctionNames
1313

1414
include $(CLANG_LEVEL)/Makefile

clang/examples/analyzer-plugin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set( LLVM_USED_LIBS
66

77
set( LLVM_LINK_COMPONENTS support mc)
88

9-
add_clang_library(SampleAnalyzerPlugin SampleAnalyzerPlugin)
9+
add_clang_library(SampleAnalyzerPlugin MainCallChecker.cpp)
1010

1111
set_target_properties(SampleAnalyzerPlugin
1212
PROPERTIES

clang/examples/analyzer-plugin/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CLANG_LEVEL := ../..
1111
LIBRARYNAME = SampleAnalyzerPlugin
1212

1313
LINK_LIBS_IN_SHARED = 0
14-
SHARED_LIBRARY = 1
14+
LOADABLE_MODULE = 1
1515

1616
include $(CLANG_LEVEL)/Makefile
1717

0 commit comments

Comments
 (0)