OSDN Git Service

[gn build] Add build files for clang/lib/{Analysis,Edit,Sema}
authorNico Weber <nicolasweber@gmx.de>
Thu, 20 Dec 2018 13:39:25 +0000 (13:39 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 20 Dec 2018 13:39:25 +0000 (13:39 +0000)
Differential Revision: https://reviews.llvm.org/D55913

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349757 91177308-0d34-0410-b5e6-96231b3b80d8

utils/gn/secondary/BUILD.gn
utils/gn/secondary/clang/include/clang/Sema/BUILD.gn [new file with mode: 0644]
utils/gn/secondary/clang/lib/Analysis/BUILD.gn [new file with mode: 0644]
utils/gn/secondary/clang/lib/Edit/BUILD.gn [new file with mode: 0644]
utils/gn/secondary/clang/lib/Sema/BUILD.gn [new file with mode: 0644]

index 1a2a366..4e0a58f 100644 (file)
@@ -1,8 +1,11 @@
 group("default") {
   deps = [
     "//clang/lib/AST",
+    "//clang/lib/Analysis",
     "//clang/lib/Basic",
+    "//clang/lib/Edit",
     "//clang/lib/Lex",
+    "//clang/lib/Sema",
     "//lld/test",
     "//llvm/tools/llvm-undname",
   ]
diff --git a/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn b/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn
new file mode 100644 (file)
index 0000000..1f41189
--- /dev/null
@@ -0,0 +1,46 @@
+import("//clang/utils/TableGen/clang_tablegen.gni")
+
+clang_tablegen("AttrTemplateInstantiate") {
+  args = [
+    "-gen-clang-attr-template-instantiate",
+    "-I",
+    rebase_path("../..", root_out_dir),
+  ]
+  td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrParsedAttrList") {
+  args = [
+    "-gen-clang-attr-parsed-attr-list",
+    "-I",
+    rebase_path("../..", root_out_dir),
+  ]
+  td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrParsedAttrKinds") {
+  args = [
+    "-gen-clang-attr-parsed-attr-kinds",
+    "-I",
+    rebase_path("../..", root_out_dir),
+  ]
+  td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrSpellingListIndex") {
+  args = [
+    "-gen-clang-attr-spelling-index",
+    "-I",
+    rebase_path("../..", root_out_dir),
+  ]
+  td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrParsedAttrImpl") {
+  args = [
+    "-gen-clang-attr-parsed-attr-impl",
+    "-I",
+    rebase_path("../..", root_out_dir),
+  ]
+  td_file = "../Basic/Attr.td"
+}
diff --git a/utils/gn/secondary/clang/lib/Analysis/BUILD.gn b/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
new file mode 100644 (file)
index 0000000..b084d75
--- /dev/null
@@ -0,0 +1,36 @@
+static_library("Analysis") {
+  output_name = "clangAnalysis"
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+    "//clang/include/clang/AST:StmtDataCollectors",
+    "//clang/lib/AST",
+    "//clang/lib/Basic",
+    "//clang/lib/Lex",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "AnalysisDeclContext.cpp",
+    "BodyFarm.cpp",
+    "CFG.cpp",
+    "CFGReachabilityAnalysis.cpp",
+    "CFGStmtMap.cpp",
+    "CallGraph.cpp",
+    "CloneDetection.cpp",
+    "CocoaConventions.cpp",
+    "CodeInjector.cpp",
+    "ConstructionContext.cpp",
+    "Consumed.cpp",
+    "Dominators.cpp",
+    "ExprMutationAnalyzer.cpp",
+    "LiveVariables.cpp",
+    "ObjCNoReturn.cpp",
+    "PostOrderCFGView.cpp",
+    "ProgramPoint.cpp",
+    "ReachableCode.cpp",
+    "ThreadSafety.cpp",
+    "ThreadSafetyCommon.cpp",
+    "ThreadSafetyLogical.cpp",
+    "ThreadSafetyTIL.cpp",
+    "UninitializedValues.cpp",
+  ]
+}
diff --git a/utils/gn/secondary/clang/lib/Edit/BUILD.gn b/utils/gn/secondary/clang/lib/Edit/BUILD.gn
new file mode 100644 (file)
index 0000000..e32e207
--- /dev/null
@@ -0,0 +1,15 @@
+static_library("Edit") {
+  output_name = "clangEdit"
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+    "//clang/lib/AST",
+    "//clang/lib/Basic",
+    "//clang/lib/Lex",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "Commit.cpp",
+    "EditedSource.cpp",
+    "RewriteObjCFoundationAPI.cpp",
+  ]
+}
diff --git a/utils/gn/secondary/clang/lib/Sema/BUILD.gn b/utils/gn/secondary/clang/lib/Sema/BUILD.gn
new file mode 100644 (file)
index 0000000..716f4d5
--- /dev/null
@@ -0,0 +1,66 @@
+static_library("Sema") {
+  output_name = "clangSema"
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+    "//clang/include/clang/Sema:AttrParsedAttrImpl",
+    "//clang/include/clang/Sema:AttrParsedAttrKinds",
+    "//clang/include/clang/Sema:AttrParsedAttrList",
+    "//clang/include/clang/Sema:AttrSpellingListIndex",
+    "//clang/include/clang/Sema:AttrTemplateInstantiate",
+    "//clang/lib/AST",
+    "//clang/lib/Analysis",
+    "//clang/lib/Basic",
+    "//clang/lib/Edit",
+    "//clang/lib/Lex",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "AnalysisBasedWarnings.cpp",
+    "CodeCompleteConsumer.cpp",
+    "DeclSpec.cpp",
+    "DelayedDiagnostic.cpp",
+    "IdentifierResolver.cpp",
+    "JumpDiagnostics.cpp",
+    "MultiplexExternalSemaSource.cpp",
+    "ParsedAttr.cpp",
+    "Scope.cpp",
+    "ScopeInfo.cpp",
+    "Sema.cpp",
+    "SemaAccess.cpp",
+    "SemaAttr.cpp",
+    "SemaCUDA.cpp",
+    "SemaCXXScopeSpec.cpp",
+    "SemaCast.cpp",
+    "SemaChecking.cpp",
+    "SemaCodeComplete.cpp",
+    "SemaConsumer.cpp",
+    "SemaCoroutine.cpp",
+    "SemaDecl.cpp",
+    "SemaDeclAttr.cpp",
+    "SemaDeclCXX.cpp",
+    "SemaDeclObjC.cpp",
+    "SemaExceptionSpec.cpp",
+    "SemaExpr.cpp",
+    "SemaExprCXX.cpp",
+    "SemaExprMember.cpp",
+    "SemaExprObjC.cpp",
+    "SemaFixItUtils.cpp",
+    "SemaInit.cpp",
+    "SemaLambda.cpp",
+    "SemaLookup.cpp",
+    "SemaObjCProperty.cpp",
+    "SemaOpenMP.cpp",
+    "SemaOverload.cpp",
+    "SemaPseudoObject.cpp",
+    "SemaStmt.cpp",
+    "SemaStmtAsm.cpp",
+    "SemaStmtAttr.cpp",
+    "SemaTemplate.cpp",
+    "SemaTemplateDeduction.cpp",
+    "SemaTemplateInstantiate.cpp",
+    "SemaTemplateInstantiateDecl.cpp",
+    "SemaTemplateVariadic.cpp",
+    "SemaType.cpp",
+    "TypeLocBuilder.cpp",
+  ]
+}