[llvm] r353244 - gn build: Fix clang-tidy build
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 15:48:13 PST 2019
Author: nico
Date: Tue Feb 5 15:48:13 2019
New Revision: 353244
URL: http://llvm.org/viewvc/llvm-project?rev=353244&view=rev
Log:
gn build: Fix clang-tidy build
Not depending on //clang/lib/StaticAnalyzer/Core and
//clang/lib/StaticAnalyzer/Frontend causes a linker error even if
ClangSACheckers are not supported.
Undefined symbols for architecture x86_64:
"clang::ento::CreateAnalysisConsumer(clang::CompilerInstance&)", referenced from:
clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(
clang::CompilerInstance&, llvm::StringRef)
in libclangTidy.a(libclangTidy.ClangTidy.o)
Patch from Mirko Bonadei <mbonadei at webrtc.org>!
Differential Revision: https://reviews.llvm.org/D57777
Modified:
llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn
Modified: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn?rev=353244&r1=353243&r2=353244&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn Tue Feb 5 15:48:13 2019
@@ -22,14 +22,12 @@ static_library("clang-tidy") {
# ClangSACheckers
]
- # TODO(mbonadei): Add support for Clang Static Analyzer checkers.
- # Without this, "clang-analyzer-" will not work.
- # if (clang_enable_static_analyzer) {
- # deps += [
- # "//clang/lib/StaticAnalyzer/Core",
- # "//clang/lib/StaticAnalyzer/Frontend",
- # ]
- # }
+ if (clang_enable_static_analyzer) {
+ deps += [
+ "//clang/lib/StaticAnalyzer/Core",
+ "//clang/lib/StaticAnalyzer/Frontend",
+ ]
+ }
sources = [
"ClangTidy.cpp",
More information about the llvm-commits
mailing list