From 0c07407bb557a5827c73a50be9559298d5526eef Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 23 Dec 2018 14:19:53 +0000 Subject: [PATCH] [gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping} Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56056 llvm-svn: 350026 --- llvm/utils/gn/secondary/BUILD.gn | 12 ++++++++++++ .../secondary/clang/tools/arcmt-test/BUILD.gn | 13 +++++++++++++ .../secondary/clang/tools/clang-check/BUILD.gn | 18 ++++++++++++++++++ .../clang/tools/clang-func-mapping/BUILD.gn | 17 +++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 llvm/utils/gn/secondary/clang/tools/arcmt-test/BUILD.gn create mode 100644 llvm/utils/gn/secondary/clang/tools/clang-check/BUILD.gn create mode 100644 llvm/utils/gn/secondary/clang/tools/clang-func-mapping/BUILD.gn diff --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn index d769f151a2dd..a52444b60d57 100644 --- a/llvm/utils/gn/secondary/BUILD.gn +++ b/llvm/utils/gn/secondary/BUILD.gn @@ -1,3 +1,6 @@ +import("//clang/lib/ARCMigrate/enable.gni") +import("//clang/lib/StaticAnalyzer/Frontend/enable.gni") + group("default") { deps = [ ":clang", @@ -17,6 +20,15 @@ group("default") { "//llvm/tools/llvm-symbolizer:symlinks", "//llvm/tools/llvm-undname", ] + if (clang_enable_arcmt) { + deps += [ "//clang/tools/arcmt-test" ] + } + if (clang_enable_static_analyzer) { + deps += [ + "//clang/tools/clang-check", + "//clang/tools/clang-func-mapping", + ] + } testonly = true } diff --git a/llvm/utils/gn/secondary/clang/tools/arcmt-test/BUILD.gn b/llvm/utils/gn/secondary/clang/tools/arcmt-test/BUILD.gn new file mode 100644 index 000000000000..c16ce2a6b7a0 --- /dev/null +++ b/llvm/utils/gn/secondary/clang/tools/arcmt-test/BUILD.gn @@ -0,0 +1,13 @@ +executable("arcmt-test") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/ARCMigrate", + "//clang/lib/Basic", + "//clang/lib/Frontend", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "arcmt-test.cpp", + ] +} diff --git a/llvm/utils/gn/secondary/clang/tools/clang-check/BUILD.gn b/llvm/utils/gn/secondary/clang/tools/clang-check/BUILD.gn new file mode 100644 index 000000000000..3d18b14949e5 --- /dev/null +++ b/llvm/utils/gn/secondary/clang/tools/clang-check/BUILD.gn @@ -0,0 +1,18 @@ +executable("clang-check") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/Driver", + "//clang/lib/Frontend", + "//clang/lib/Frontend/Rewrite", + "//clang/lib/StaticAnalyzer/Frontend", + "//clang/lib/Tooling", + "//llvm/lib/Option", + "//llvm/lib/Support", + "//llvm/lib/Target:TargetsToBuild", + ] + sources = [ + "ClangCheck.cpp", + ] +} diff --git a/llvm/utils/gn/secondary/clang/tools/clang-func-mapping/BUILD.gn b/llvm/utils/gn/secondary/clang/tools/clang-func-mapping/BUILD.gn new file mode 100644 index 000000000000..cc610551935e --- /dev/null +++ b/llvm/utils/gn/secondary/clang/tools/clang-func-mapping/BUILD.gn @@ -0,0 +1,17 @@ +executable("clang-func-mapping") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/CrossTU", + "//clang/lib/Frontend", + "//clang/lib/Index", + "//clang/lib/Tooling", + "//llvm/lib/AsmParser", + "//llvm/lib/MC", + "//llvm/lib/Support", + ] + sources = [ + "ClangFnMapGen.cpp", + ] +}