Index: clang-tools-extra/clang-tidy/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-tidy/CMakeLists.txt +++ clang-tools-extra/clang-tidy/CMakeLists.txt @@ -1,5 +1,7 @@ set(LLVM_LINK_COMPONENTS Support + AllTargetsAsmParsers + AllTargetsInfos ) add_clang_library(clangTidy Index: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp =================================================================== --- clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -18,6 +18,7 @@ #include "../ClangTidy.h" #include "clang/Tooling/CommonOptionsParser.h" #include "llvm/Support/Process.h" +#include "llvm/Support/TargetSelect.h" using namespace clang::ast_matchers; using namespace clang::driver; @@ -401,6 +402,10 @@ return 0; } + llvm::InitializeAllTargetInfos(); + llvm::InitializeAllTargetMCs(); + llvm::InitializeAllAsmParsers(); + ProfileData Profile; ClangTidyContext Context(std::move(OwningOptionsProvider));