From bc1c22befe4debbc3112c87104f2d6e31b1fd348 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 20 Dec 2018 13:39:25 +0000 Subject: [PATCH] [gn build] Add build files for clang/lib/{Analysis,Edit,Sema} 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 | 3 + .../clang/include/clang/Sema/BUILD.gn | 46 +++++++++++++ .../gn/secondary/clang/lib/Analysis/BUILD.gn | 36 ++++++++++ utils/gn/secondary/clang/lib/Edit/BUILD.gn | 15 +++++ utils/gn/secondary/clang/lib/Sema/BUILD.gn | 66 +++++++++++++++++++ 5 files changed, 166 insertions(+) create mode 100644 utils/gn/secondary/clang/include/clang/Sema/BUILD.gn create mode 100644 utils/gn/secondary/clang/lib/Analysis/BUILD.gn create mode 100644 utils/gn/secondary/clang/lib/Edit/BUILD.gn create mode 100644 utils/gn/secondary/clang/lib/Sema/BUILD.gn diff --git a/utils/gn/secondary/BUILD.gn b/utils/gn/secondary/BUILD.gn index 1a2a366b594..4e0a58fdf7d 100644 --- a/utils/gn/secondary/BUILD.gn +++ b/utils/gn/secondary/BUILD.gn @@ -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 index 00000000000..1f41189e8ab --- /dev/null +++ b/utils/gn/secondary/clang/include/clang/Sema/BUILD.gn @@ -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 index 00000000000..b084d759937 --- /dev/null +++ b/utils/gn/secondary/clang/lib/Analysis/BUILD.gn @@ -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 index 00000000000..e32e207443f --- /dev/null +++ b/utils/gn/secondary/clang/lib/Edit/BUILD.gn @@ -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 index 00000000000..716f4d555b9 --- /dev/null +++ b/utils/gn/secondary/clang/lib/Sema/BUILD.gn @@ -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", + ] +} -- 2.50.1