File tree Expand file tree Collapse file tree 12 files changed +25
-14
lines changed Expand file tree Collapse file tree 12 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUN
17
17
18
18
llvm_canonicalize_cmake_booleans (
19
19
CLANG_TIDY_ENABLE_STATIC_ANALYZER
20
- LLVM_ENABLE_PLUGINS
20
+ CLANG_PLUGIN_SUPPORT
21
21
LLVM_INSTALL_TOOLCHAIN_ONLY
22
22
)
23
23
@@ -87,10 +87,19 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
87
87
PLUGIN_TOOL clang-tidy
88
88
DEPENDS clang-tidy-headers )
89
89
90
+ if (CLANG_BUILT_STANDALONE )
91
+ # LLVMHello library is needed below
92
+ if (EXISTS ${LLVM_MAIN_SRC_DIR} /lib/Transforms/Hello
93
+ AND NOT TARGET LLVMHello )
94
+ add_subdirectory (${LLVM_MAIN_SRC_DIR} /lib/Transforms/Hello
95
+ lib/Transforms/Hello )
96
+ endif ()
97
+ endif ()
98
+
90
99
if (TARGET CTTestTidyModule )
91
100
list (APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello )
92
101
target_include_directories (CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR} " )
93
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
102
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
94
103
set (LLVM_LINK_COMPONENTS
95
104
Support
96
105
)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ config.clang_libs_dir = "@SHLIBDIR@"
12
12
config.python_executable = "@Python3_EXECUTABLE@"
13
13
config.target_triple = "@TARGET_TRIPLE@"
14
14
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
15
- config.has_plugins = @LLVM_ENABLE_PLUGINS @ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
15
+ config.has_plugins = @CLANG_PLUGIN_SUPPORT @ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
16
16
17
17
# Support substitution of the tools and libs dirs with user parameters. This is
18
18
# used when we can't determine the tool dir at configuration time.
Original file line number Diff line number Diff line change @@ -476,6 +476,10 @@ add_definitions( -D_GNU_SOURCE )
476
476
option (CLANG_BUILD_TOOLS
477
477
"Build the Clang tools. If OFF, just generate build targets." ON )
478
478
479
+ CMAKE_DEPENDENT_OPTION (CLANG_PLUGIN_SUPPORT
480
+ "Build clang with plugin support" ON
481
+ "LLVM_ENABLE_PLUGINS OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS" OFF )
482
+
479
483
option (CLANG_ENABLE_ARCMT "Build ARCMT." ON )
480
484
option (CLANG_ENABLE_STATIC_ANALYZER
481
485
"Include static analyzer in clang binary." ON )
Original file line number Diff line number Diff line change 1
1
add_llvm_library (AnnotateFunctions MODULE AnnotateFunctions.cpp PLUGIN_TOOL clang )
2
2
3
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
3
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
4
4
set (LLVM_LINK_COMPONENTS
5
5
Support
6
6
)
Original file line number Diff line number Diff line change 1
1
add_llvm_library (Attribute MODULE Attribute.cpp PLUGIN_TOOL clang )
2
2
3
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
3
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
4
4
target_link_libraries (Attribute PRIVATE
5
5
clangAST
6
6
clangBasic
Original file line number Diff line number Diff line change 1
1
add_llvm_library (CallSuperAttr MODULE CallSuperAttrInfo.cpp PLUGIN_TOOL clang )
2
2
3
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
3
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
4
4
set (LLVM_LINK_COMPONENTS
5
5
Support
6
6
)
Original file line number Diff line number Diff line change 1
1
add_llvm_library (PluginsOrder MODULE PluginsOrder.cpp PLUGIN_TOOL clang )
2
2
3
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
3
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
4
4
set (LLVM_LINK_COMPONENTS
5
5
Support
6
6
)
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ endif()
11
11
12
12
add_llvm_library (PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang )
13
13
14
- if (LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN ))
14
+ if (CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN ))
15
15
set (LLVM_LINK_COMPONENTS
16
16
Support
17
17
)
Original file line number Diff line number Diff line change 1
- if (CLANG_ENABLE_STATIC_ANALYZER AND LLVM_ENABLE_PLUGINS )
1
+ if (CLANG_ENABLE_STATIC_ANALYZER AND CLANG_PLUGIN_SUPPORT )
2
2
add_subdirectory (SampleAnalyzer )
3
3
add_subdirectory (CheckerDependencyHandling )
4
4
add_subdirectory (CheckerOptionHandling )
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ llvm_canonicalize_cmake_booleans(
14
14
CLANG_DEFAULT_PIE_ON_LINUX
15
15
CLANG_ENABLE_ARCMT
16
16
CLANG_ENABLE_STATIC_ANALYZER
17
+ CLANG_PLUGIN_SUPPORT
17
18
CLANG_SPAWN_CC1
18
19
ENABLE_BACKTRACES
19
20
LLVM_ENABLE_NEW_PASS_MANAGER
20
21
LLVM_ENABLE_ZLIB
21
22
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR
22
- LLVM_ENABLE_PLUGINS
23
23
LLVM_ENABLE_THREADS
24
24
LLVM_WITH_Z3
25
25
)
@@ -145,7 +145,7 @@ if( NOT CLANG_BUILT_STANDALONE )
145
145
endif ()
146
146
147
147
if (CLANG_ENABLE_STATIC_ANALYZER )
148
- if (LLVM_ENABLE_PLUGINS )
148
+ if (CLANG_PLUGIN_SUPPORT )
149
149
list (APPEND CLANG_TEST_DEPS
150
150
SampleAnalyzerPlugin
151
151
CheckerDependencyHandlingAnalyzerPlugin
You can’t perform that action at this time.
0 commit comments