[llvm] r349756 - [gn build] Add build files for clang/lib/Lex and clang/lib/AST
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 05:38:36 PST 2018
Author: nico
Date: Thu Dec 20 05:38:36 2018
New Revision: 349756
URL: http://llvm.org/viewvc/llvm-project?rev=349756&view=rev
Log:
[gn build] Add build files for clang/lib/Lex and clang/lib/AST
Differential Revision: https://reviews.llvm.org/D55912
Added:
llvm/trunk/utils/gn/secondary/clang/include/clang/AST/
llvm/trunk/utils/gn/secondary/clang/include/clang/AST/BUILD.gn
llvm/trunk/utils/gn/secondary/clang/lib/AST/
llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn
llvm/trunk/utils/gn/secondary/clang/lib/Lex/
llvm/trunk/utils/gn/secondary/clang/lib/Lex/BUILD.gn
Modified:
llvm/trunk/utils/gn/secondary/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
Modified: llvm/trunk/utils/gn/secondary/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/BUILD.gn?rev=349756&r1=349755&r2=349756&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/BUILD.gn Thu Dec 20 05:38:36 2018
@@ -1,6 +1,8 @@
group("default") {
deps = [
+ "//clang/lib/AST",
"//clang/lib/Basic",
+ "//clang/lib/Lex",
"//lld/test",
"//llvm/tools/llvm-undname",
]
Added: llvm/trunk/utils/gn/secondary/clang/include/clang/AST/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/include/clang/AST/BUILD.gn?rev=349756&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/include/clang/AST/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang/include/clang/AST/BUILD.gn Thu Dec 20 05:38:36 2018
@@ -0,0 +1,79 @@
+import("//clang/utils/TableGen/clang_tablegen.gni")
+
+clang_tablegen("Attrs") {
+ args = [
+ "-gen-clang-attr-classes",
+ "-I",
+ rebase_path("../..", root_out_dir),
+ ]
+ td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrImpl") {
+ args = [
+ "-gen-clang-attr-impl",
+ "-I",
+ rebase_path("../..", root_out_dir),
+ ]
+ td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrDump") {
+ args = [
+ "-gen-clang-attr-dump",
+ "-I",
+ rebase_path("../..", root_out_dir),
+ ]
+ td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("AttrVisitor") {
+ args = [
+ "-gen-clang-attr-ast-visitor",
+ "-I",
+ rebase_path("../..", root_out_dir),
+ ]
+ td_file = "../Basic/Attr.td"
+}
+
+clang_tablegen("StmtNodes") {
+ args = [ "-gen-clang-stmt-nodes" ]
+ td_file = "../Basic/StmtNodes.td"
+}
+
+clang_tablegen("DeclNodes") {
+ args = [ "-gen-clang-decl-nodes" ]
+ td_file = "../Basic/DeclNodes.td"
+}
+
+clang_tablegen("CommentNodes") {
+ args = [ "-gen-clang-comment-nodes" ]
+ td_file = "../Basic/CommentNodes.td"
+}
+
+clang_tablegen("CommentHTMLTags") {
+ args = [ "-gen-clang-comment-html-tags" ]
+}
+
+clang_tablegen("CommentHTMLTagsProperties") {
+ args = [ "-gen-clang-comment-html-tags-properties" ]
+ td_file = "CommentHTMLTags.td"
+}
+
+clang_tablegen("CommentHTMLNamedCharacterReferences") {
+ args = [ "-gen-clang-comment-html-named-character-references" ]
+}
+
+clang_tablegen("CommentCommandInfo") {
+ args = [ "-gen-clang-comment-command-info" ]
+ td_file = "CommentCommands.td"
+}
+
+clang_tablegen("CommentCommandList") {
+ args = [ "-gen-clang-comment-command-list" ]
+ td_file = "CommentCommands.td"
+}
+
+clang_tablegen("StmtDataCollectors") {
+ args = [ "-gen-clang-data-collectors" ]
+}
Added: llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn?rev=349756&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn Thu Dec 20 05:38:36 2018
@@ -0,0 +1,101 @@
+static_library("AST") {
+ output_name = "clangAST"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/include/clang/AST:AttrDump",
+ "//clang/include/clang/AST:AttrImpl",
+ "//clang/include/clang/AST:CommentCommandInfo",
+ "//clang/include/clang/AST:CommentHTMLNamedCharacterReferences",
+ "//clang/include/clang/AST:CommentHTMLTags",
+ "//clang/include/clang/AST:CommentHTMLTagsProperties",
+ "//clang/include/clang/AST:DeclNodes",
+ "//clang/lib/Basic",
+ "//clang/lib/Lex",
+ "//llvm/lib/BinaryFormat",
+ "//llvm/lib/Support",
+ ]
+
+ # Generated files used in public headers should be in public_deps, the rest
+ # in regular deps.
+ public_deps = [
+ "//clang/include/clang/AST:AttrVisitor",
+ "//clang/include/clang/AST:Attrs",
+ "//clang/include/clang/AST:CommentCommandList",
+ "//clang/include/clang/AST:CommentNodes",
+ "//clang/include/clang/AST:StmtNodes",
+ ]
+ sources = [
+ "APValue.cpp",
+ "ASTConsumer.cpp",
+ "ASTContext.cpp",
+ "ASTDiagnostic.cpp",
+ "ASTDumper.cpp",
+ "ASTImporter.cpp",
+ "ASTImporterLookupTable.cpp",
+ "ASTStructuralEquivalence.cpp",
+ "ASTTypeTraits.cpp",
+ "AttrImpl.cpp",
+ "CXXInheritance.cpp",
+ "Comment.cpp",
+ "CommentBriefParser.cpp",
+ "CommentCommandTraits.cpp",
+ "CommentLexer.cpp",
+ "CommentParser.cpp",
+ "CommentSema.cpp",
+ "ComparisonCategories.cpp",
+ "DataCollection.cpp",
+ "Decl.cpp",
+ "DeclBase.cpp",
+ "DeclCXX.cpp",
+ "DeclFriend.cpp",
+ "DeclGroup.cpp",
+ "DeclObjC.cpp",
+ "DeclOpenMP.cpp",
+ "DeclPrinter.cpp",
+ "DeclTemplate.cpp",
+ "DeclarationName.cpp",
+ "Expr.cpp",
+ "ExprCXX.cpp",
+ "ExprClassification.cpp",
+ "ExprConstant.cpp",
+ "ExprObjC.cpp",
+ "ExternalASTMerger.cpp",
+ "ExternalASTSource.cpp",
+ "FormatString.cpp",
+ "InheritViz.cpp",
+ "ItaniumCXXABI.cpp",
+ "ItaniumMangle.cpp",
+ "Mangle.cpp",
+ "MicrosoftCXXABI.cpp",
+ "MicrosoftMangle.cpp",
+ "NSAPI.cpp",
+ "NestedNameSpecifier.cpp",
+ "ODRHash.cpp",
+ "OSLog.cpp",
+ "OpenMPClause.cpp",
+ "ParentMap.cpp",
+ "PrintfFormatString.cpp",
+ "QualTypeNames.cpp",
+ "RawCommentList.cpp",
+ "RecordLayout.cpp",
+ "RecordLayoutBuilder.cpp",
+ "ScanfFormatString.cpp",
+ "SelectorLocationsKind.cpp",
+ "Stmt.cpp",
+ "StmtCXX.cpp",
+ "StmtIterator.cpp",
+ "StmtObjC.cpp",
+ "StmtOpenMP.cpp",
+ "StmtPrinter.cpp",
+ "StmtProfile.cpp",
+ "StmtViz.cpp",
+ "TemplateBase.cpp",
+ "TemplateName.cpp",
+ "TextNodeDumper.cpp",
+ "Type.cpp",
+ "TypeLoc.cpp",
+ "TypePrinter.cpp",
+ "VTTBuilder.cpp",
+ "VTableBuilder.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang/lib/Lex/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/lib/Lex/BUILD.gn?rev=349756&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/lib/Lex/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang/lib/Lex/BUILD.gn Thu Dec 20 05:38:36 2018
@@ -0,0 +1,31 @@
+static_library("Lex") {
+ output_name = "clangLex"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/lib/Basic",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "HeaderMap.cpp",
+ "HeaderSearch.cpp",
+ "Lexer.cpp",
+ "LiteralSupport.cpp",
+ "MacroArgs.cpp",
+ "MacroInfo.cpp",
+ "ModuleMap.cpp",
+ "PPCaching.cpp",
+ "PPCallbacks.cpp",
+ "PPConditionalDirectiveRecord.cpp",
+ "PPDirectives.cpp",
+ "PPExpressions.cpp",
+ "PPLexerChange.cpp",
+ "PPMacroExpansion.cpp",
+ "Pragma.cpp",
+ "PreprocessingRecord.cpp",
+ "Preprocessor.cpp",
+ "PreprocessorLexer.cpp",
+ "ScratchBuffer.cpp",
+ "TokenConcatenation.cpp",
+ "TokenLexer.cpp",
+ ]
+}
Modified: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn?rev=349756&r1=349755&r2=349756&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn Thu Dec 20 05:38:36 2018
@@ -39,9 +39,13 @@ action("BuildVariables.inc") {
l = "-l"
lib = ""
}
+
# Windows doesn't use any of libxml2,terminfo, zlib by default.
# Make GN not warn about these variables being unused.
- not_needed(["l", "lib"])
+ not_needed([
+ "l",
+ "lib",
+ ])
system_libs = ""
if (host_os == "win") {
More information about the llvm-commits
mailing list