Skip to content

Commit 00e6bee

Browse files
committedDec 22, 2018
[gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, clang/lib/StaticAnalyzer/{Checkers,Core,Frontend}
The intent is to add the build file for clang/lib/StaticAnalyzer/Frontend; everything else is pulled in by that. Differential Revision: https://reviews.llvm.org/D55978 llvm-svn: 349986
1 parent e4e0b9f commit 00e6bee

File tree

7 files changed

+266
-0
lines changed

7 files changed

+266
-0
lines changed
 

‎llvm/utils/gn/secondary/BUILD.gn

+7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
group("default") {
22
deps = [
3+
"//clang/lib/AST",
4+
"//clang/lib/ASTMatchers",
35
"//clang/lib/CodeGen",
6+
"//clang/lib/CrossTU",
47
"//clang/lib/Driver",
58
"//clang/lib/Frontend",
69
"//clang/lib/Frontend/Rewrite",
10+
"//clang/lib/Index",
711
"//clang/lib/Parse",
812
"//clang/lib/Serialization",
13+
"//clang/lib/StaticAnalyzer/Checkers",
14+
"//clang/lib/StaticAnalyzer/Core",
15+
"//clang/lib/StaticAnalyzer/Frontend",
916
"//clang/tools/clang-format",
1017
"//lld/test",
1118
"//llvm/tools/llvm-undname",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
static_library("ASTMatchers") {
2+
output_name = "clangASTMatchers"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/lib/AST",
6+
"//clang/lib/Basic",
7+
"//llvm/lib/Support",
8+
]
9+
sources = [
10+
"ASTMatchFinder.cpp",
11+
"ASTMatchersInternal.cpp",
12+
]
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
static_library("CrossTU") {
2+
output_name = "clangCrossTU"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/lib/AST",
6+
"//clang/lib/Basic",
7+
"//clang/lib/Frontend",
8+
"//clang/lib/Index",
9+
"//llvm/lib/Support",
10+
]
11+
sources = [
12+
"CrossTranslationUnit.cpp",
13+
]
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
static_library("Index") {
2+
output_name = "clangIndex"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/lib/AST",
6+
"//clang/lib/Basic",
7+
"//clang/lib/Format",
8+
"//clang/lib/Frontend",
9+
"//clang/lib/Rewrite",
10+
"//clang/lib/Serialization",
11+
"//clang/lib/Tooling/Core",
12+
"//llvm/lib/IR",
13+
"//llvm/lib/Support",
14+
]
15+
sources = [
16+
"CodegenNameGenerator.cpp",
17+
"CommentToXML.cpp",
18+
"IndexBody.cpp",
19+
"IndexDecl.cpp",
20+
"IndexSymbol.cpp",
21+
"IndexTypeSourceInfo.cpp",
22+
"IndexingAction.cpp",
23+
"IndexingContext.cpp",
24+
"IndexingContext.h",
25+
"SimpleFormatContext.h",
26+
"USRGeneration.cpp",
27+
]
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
static_library("Checkers") {
2+
output_name = "clangStaticAnalyzerCheckers"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/include/clang/StaticAnalyzer/Checkers",
6+
"//clang/lib/AST",
7+
"//clang/lib/ASTMatchers",
8+
"//clang/lib/Analysis",
9+
"//clang/lib/Basic",
10+
"//clang/lib/Lex",
11+
"//clang/lib/StaticAnalyzer/Core",
12+
"//llvm/lib/Support",
13+
]
14+
sources = [
15+
"AnalysisOrderChecker.cpp",
16+
"AnalyzerStatsChecker.cpp",
17+
"ArrayBoundChecker.cpp",
18+
"ArrayBoundCheckerV2.cpp",
19+
"BasicObjCFoundationChecks.cpp",
20+
"BlockInCriticalSectionChecker.cpp",
21+
"BoolAssignmentChecker.cpp",
22+
"BuiltinFunctionChecker.cpp",
23+
"CStringChecker.cpp",
24+
"CStringSyntaxChecker.cpp",
25+
"CXXSelfAssignmentChecker.cpp",
26+
"CallAndMessageChecker.cpp",
27+
"CastSizeChecker.cpp",
28+
"CastToStructChecker.cpp",
29+
"CheckObjCDealloc.cpp",
30+
"CheckObjCInstMethSignature.cpp",
31+
"CheckSecuritySyntaxOnly.cpp",
32+
"CheckSizeofPointer.cpp",
33+
"CheckerDocumentation.cpp",
34+
"ChrootChecker.cpp",
35+
"CloneChecker.cpp",
36+
"ConversionChecker.cpp",
37+
"DeadStoresChecker.cpp",
38+
"DebugCheckers.cpp",
39+
"DeleteWithNonVirtualDtorChecker.cpp",
40+
"DereferenceChecker.cpp",
41+
"DirectIvarAssignment.cpp",
42+
"DivZeroChecker.cpp",
43+
"DynamicTypeChecker.cpp",
44+
"DynamicTypePropagation.cpp",
45+
"EnumCastOutOfRangeChecker.cpp",
46+
"ExprInspectionChecker.cpp",
47+
"FixedAddressChecker.cpp",
48+
"GCDAntipatternChecker.cpp",
49+
"GTestChecker.cpp",
50+
"GenericTaintChecker.cpp",
51+
"IdenticalExprChecker.cpp",
52+
"InnerPointerChecker.cpp",
53+
"IteratorChecker.cpp",
54+
"IvarInvalidationChecker.cpp",
55+
"LLVMConventionsChecker.cpp",
56+
"LocalizationChecker.cpp",
57+
"MPI-Checker/MPIBugReporter.cpp",
58+
"MPI-Checker/MPIChecker.cpp",
59+
"MPI-Checker/MPIFunctionClassifier.cpp",
60+
"MacOSKeychainAPIChecker.cpp",
61+
"MacOSXAPIChecker.cpp",
62+
"MallocChecker.cpp",
63+
"MallocOverflowSecurityChecker.cpp",
64+
"MallocSizeofChecker.cpp",
65+
"MmapWriteExecChecker.cpp",
66+
"MoveChecker.cpp",
67+
"NSAutoreleasePoolChecker.cpp",
68+
"NSErrorChecker.cpp",
69+
"NoReturnFunctionChecker.cpp",
70+
"NonNullParamChecker.cpp",
71+
"NonnullGlobalConstantsChecker.cpp",
72+
"NullabilityChecker.cpp",
73+
"NumberObjectConversionChecker.cpp",
74+
"ObjCAtSyncChecker.cpp",
75+
"ObjCAutoreleaseWriteChecker.cpp",
76+
"ObjCContainersASTChecker.cpp",
77+
"ObjCContainersChecker.cpp",
78+
"ObjCMissingSuperCallChecker.cpp",
79+
"ObjCPropertyChecker.cpp",
80+
"ObjCSelfInitChecker.cpp",
81+
"ObjCSuperDeallocChecker.cpp",
82+
"ObjCUnusedIVarsChecker.cpp",
83+
"PaddingChecker.cpp",
84+
"PointerArithChecker.cpp",
85+
"PointerSubChecker.cpp",
86+
"PthreadLockChecker.cpp",
87+
"RetainCountChecker/RetainCountChecker.cpp",
88+
"RetainCountChecker/RetainCountDiagnostics.cpp",
89+
"ReturnPointerRangeChecker.cpp",
90+
"ReturnUndefChecker.cpp",
91+
"RunLoopAutoreleaseLeakChecker.cpp",
92+
"SimpleStreamChecker.cpp",
93+
"StackAddrEscapeChecker.cpp",
94+
"StdLibraryFunctionsChecker.cpp",
95+
"StreamChecker.cpp",
96+
"TaintTesterChecker.cpp",
97+
"TestAfterDivZeroChecker.cpp",
98+
"TraversalChecker.cpp",
99+
"TrustNonnullChecker.cpp",
100+
"UndefBranchChecker.cpp",
101+
"UndefCapturedBlockVarChecker.cpp",
102+
"UndefResultChecker.cpp",
103+
"UndefinedArraySubscriptChecker.cpp",
104+
"UndefinedAssignmentChecker.cpp",
105+
"UninitializedObject/UninitializedObjectChecker.cpp",
106+
"UninitializedObject/UninitializedPointee.cpp",
107+
"UnixAPIChecker.cpp",
108+
"UnreachableCodeChecker.cpp",
109+
"VLASizeChecker.cpp",
110+
"ValistChecker.cpp",
111+
"VforkChecker.cpp",
112+
"VirtualCallChecker.cpp",
113+
]
114+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
static_library("Core") {
2+
output_name = "clangStaticAnalyzerCore"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/include/clang/Config",
6+
"//clang/lib/AST",
7+
"//clang/lib/ASTMatchers",
8+
"//clang/lib/Analysis",
9+
"//clang/lib/Basic",
10+
"//clang/lib/CrossTU",
11+
"//clang/lib/Lex",
12+
"//clang/lib/Rewrite",
13+
"//llvm/lib/Support",
14+
]
15+
sources = [
16+
"APSIntType.cpp",
17+
"AnalysisManager.cpp",
18+
"AnalyzerOptions.cpp",
19+
"BasicValueFactory.cpp",
20+
"BlockCounter.cpp",
21+
"BugReporter.cpp",
22+
"BugReporterVisitors.cpp",
23+
"CallEvent.cpp",
24+
"Checker.cpp",
25+
"CheckerContext.cpp",
26+
"CheckerHelpers.cpp",
27+
"CheckerManager.cpp",
28+
"CommonBugCategories.cpp",
29+
"ConstraintManager.cpp",
30+
"CoreEngine.cpp",
31+
"DynamicTypeMap.cpp",
32+
"Environment.cpp",
33+
"ExplodedGraph.cpp",
34+
"ExprEngine.cpp",
35+
"ExprEngineC.cpp",
36+
"ExprEngineCXX.cpp",
37+
"ExprEngineCallAndReturn.cpp",
38+
"ExprEngineObjC.cpp",
39+
"FunctionSummary.cpp",
40+
"HTMLDiagnostics.cpp",
41+
"IssueHash.cpp",
42+
"LoopUnrolling.cpp",
43+
"LoopWidening.cpp",
44+
"MemRegion.cpp",
45+
"PathDiagnostic.cpp",
46+
"PlistDiagnostics.cpp",
47+
"ProgramState.cpp",
48+
"RangeConstraintManager.cpp",
49+
"RangedConstraintManager.cpp",
50+
"RegionStore.cpp",
51+
"RetainSummaryManager.cpp",
52+
"SValBuilder.cpp",
53+
"SVals.cpp",
54+
"SarifDiagnostics.cpp",
55+
"SimpleConstraintManager.cpp",
56+
"SimpleSValBuilder.cpp",
57+
"Store.cpp",
58+
"SubEngine.cpp",
59+
"SymbolManager.cpp",
60+
"TaintManager.cpp",
61+
"WorkList.cpp",
62+
"Z3ConstraintManager.cpp",
63+
]
64+
65+
# FIXME: clang/Config/BUILD.gn currently always sets CLANG_ANALYZER_WITH_Z3
66+
# to false. If that changes we need to link to Z3 libs here.
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
static_library("Frontend") {
2+
output_name = "clangStaticAnalyzerFrontend"
3+
configs += [ "//llvm/utils/gn/build:clang_code" ]
4+
deps = [
5+
"//clang/lib/AST",
6+
"//clang/lib/Analysis",
7+
"//clang/lib/Basic",
8+
"//clang/lib/CrossTU",
9+
"//clang/lib/Frontend",
10+
"//clang/lib/Lex",
11+
"//clang/lib/StaticAnalyzer/Checkers",
12+
"//clang/lib/StaticAnalyzer/Core",
13+
"//llvm/lib/Support",
14+
]
15+
sources = [
16+
"AnalysisConsumer.cpp",
17+
"CheckerRegistration.cpp",
18+
"CheckerRegistry.cpp",
19+
"FrontendActions.cpp",
20+
"ModelConsumer.cpp",
21+
"ModelInjector.cpp",
22+
]
23+
}

0 commit comments

Comments
 (0)
Please sign in to comment.