llvm.org GIT mirror llvm / 1d809c6
[gn build] Add build file for clang/lib/Parse Nothing really interesting. One thing to consider is where the clang_tablegen() invocations that generate files that are private to a library should be. The CMake build puts them in clang/include/clang/Parse (in this case), but maybe putting them right in clang/lib/Parse/BUILD.gn makes mor sense. (For clang_tablegen() calls that generate .inc files used by the public headers, putting the call in the public BUILD file makes sense.) For now, I've put the build file in the public header folder, since that matches CMake and what I did in the last 2 clang patches, but I'm not sure I like this. Differential Revision: https://reviews.llvm.org/D55925 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349831 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 9 months ago
3 changed file(s) with 52 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 group("default") {
11 deps = [
2 "//clang/lib/Parse",
23 "//clang/tools/clang-format",
34 "//lld/test",
45 "//llvm/tools/llvm-undname",
0 import("//clang/utils/TableGen/clang_tablegen.gni")
1
2 clang_tablegen("AttrParserStringSwitches") {
3 args = [
4 "-gen-clang-attr-parser-string-switches",
5 "-I",
6 rebase_path("../..", root_out_dir),
7 ]
8 td_file = "../Basic/Attr.td"
9 }
10
11 clang_tablegen("AttrSubMatchRulesParserStringSwitches") {
12 args = [
13 "-gen-clang-attr-subject-match-rules-parser-string-switches",
14 "-I",
15 rebase_path("../..", root_out_dir),
16 ]
17 td_file = "../Basic/Attr.td"
18 }
0 static_library("Parse") {
1 output_name = "clangParse"
2 configs += [ "//llvm/utils/gn/build:clang_code" ]
3 deps = [
4 "//clang/include/clang/Parse:AttrParserStringSwitches",
5 "//clang/include/clang/Parse:AttrSubMatchRulesParserStringSwitches",
6 "//clang/lib/AST",
7 "//clang/lib/Basic",
8 "//clang/lib/Lex",
9 "//clang/lib/Sema",
10 "//llvm/lib/MC",
11 "//llvm/lib/MC/MCParser",
12 "//llvm/lib/Support",
13 ]
14 sources = [
15 "ParseAST.cpp",
16 "ParseCXXInlineMethods.cpp",
17 "ParseDecl.cpp",
18 "ParseDeclCXX.cpp",
19 "ParseExpr.cpp",
20 "ParseExprCXX.cpp",
21 "ParseInit.cpp",
22 "ParseObjc.cpp",
23 "ParseOpenMP.cpp",
24 "ParsePragma.cpp",
25 "ParseStmt.cpp",
26 "ParseStmtAsm.cpp",
27 "ParseTemplate.cpp",
28 "ParseTentative.cpp",
29 "Parser.cpp",
30 ]
31 }