This revision was automatically updated to reflect the committed changes. Closed by commit rL348764: [libclang] Revert removal of tidy plugin support from libclang introduced in… (authored by yvvan, committed by ). Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D55415?vs=177134&id=177515#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55415/new/ https://reviews.llvm.org/D55415 Files: cfe/trunk/tools/libclang/CIndex.cpp cfe/trunk/tools/libclang/CMakeLists.txt Index: cfe/trunk/tools/libclang/CIndex.cpp =================================================================== --- cfe/trunk/tools/libclang/CIndex.cpp +++ cfe/trunk/tools/libclang/CIndex.cpp @@ -8938,3 +8938,16 @@ OS << "--------------------------------------------------\n"; } } + +#ifdef CLANG_TOOL_EXTRA_BUILD +// This anchor is used to force the linker to link the clang-tidy plugin. +extern volatile int ClangTidyPluginAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ClangTidyPluginAnchorDestination = + ClangTidyPluginAnchorSource; + +// This anchor is used to force the linker to link the clang-include-fixer +// plugin. +extern volatile int ClangIncludeFixerPluginAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ClangIncludeFixerPluginAnchorDestination = + ClangIncludeFixerPluginAnchorSource; +#endif Index: cfe/trunk/tools/libclang/CMakeLists.txt =================================================================== --- cfe/trunk/tools/libclang/CMakeLists.txt +++ cfe/trunk/tools/libclang/CMakeLists.txt @@ -47,6 +47,15 @@ list(APPEND LIBS clangARCMigrate) endif () +if (TARGET clangTidyPlugin) + add_definitions(-DCLANG_TOOL_EXTRA_BUILD) + list(APPEND LIBS clangTidyPlugin) + list(APPEND LIBS clangIncludeFixerPlugin) + if(LLVM_ENABLE_MODULES) + list(APPEND LLVM_COMPILE_FLAGS "-fmodules-ignore-macro=CLANG_TOOL_EXTRA_BUILD") + endif() +endif () + find_library(DL_LIBRARY_PATH dl) if (DL_LIBRARY_PATH) list(APPEND LIBS dl)
Index: cfe/trunk/tools/libclang/CIndex.cpp =================================================================== --- cfe/trunk/tools/libclang/CIndex.cpp +++ cfe/trunk/tools/libclang/CIndex.cpp @@ -8938,3 +8938,16 @@ OS << "--------------------------------------------------\n"; } } + +#ifdef CLANG_TOOL_EXTRA_BUILD +// This anchor is used to force the linker to link the clang-tidy plugin. +extern volatile int ClangTidyPluginAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ClangTidyPluginAnchorDestination = + ClangTidyPluginAnchorSource; + +// This anchor is used to force the linker to link the clang-include-fixer +// plugin. +extern volatile int ClangIncludeFixerPluginAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ClangIncludeFixerPluginAnchorDestination = + ClangIncludeFixerPluginAnchorSource; +#endif Index: cfe/trunk/tools/libclang/CMakeLists.txt =================================================================== --- cfe/trunk/tools/libclang/CMakeLists.txt +++ cfe/trunk/tools/libclang/CMakeLists.txt @@ -47,6 +47,15 @@ list(APPEND LIBS clangARCMigrate) endif () +if (TARGET clangTidyPlugin) + add_definitions(-DCLANG_TOOL_EXTRA_BUILD) + list(APPEND LIBS clangTidyPlugin) + list(APPEND LIBS clangIncludeFixerPlugin) + if(LLVM_ENABLE_MODULES) + list(APPEND LLVM_COMPILE_FLAGS "-fmodules-ignore-macro=CLANG_TOOL_EXTRA_BUILD") + endif() +endif () + find_library(DL_LIBRARY_PATH dl) if (DL_LIBRARY_PATH) list(APPEND LIBS dl)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits