[PATCH] D65462: gn build: Fix check-clang-tools after r362702.

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 30 11:16:48 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367340: gn build: Fix check-clang-tools after r362702. (authored by nico, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D65462?vs=212387&id=212391#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65462/new/

https://reviews.llvm.org/D65462

Files:
  llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-include-fixer/plugin/BUILD.gn
  llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
  llvm/trunk/utils/gn/secondary/clang/tools/libclang/BUILD.gn


Index: llvm/trunk/utils/gn/secondary/clang/tools/libclang/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/clang/tools/libclang/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/clang/tools/libclang/BUILD.gn
@@ -39,8 +39,22 @@
     deps += [ "//clang/lib/ARCMigrate" ]
   }
 
+  defines = []
+
+  # FIXME: Once the GN build has a way to select which bits to build,
+  # only include this dependency if clang-tools-extra is part of the build.
+  # FIXME: libclang depending on anything in clang-tools-extra seems like
+  # a layering violation.
+  if (true) {
+    defines += [ "CLANG_TOOL_EXTRA_BUILD" ]
+    deps += [
+      "//clang-tools-extra/clang-include-fixer/plugin",
+      "//clang-tools-extra/clang-tidy/plugin",
+    ]
+  }
+
   if (host_os == "win") {
-    defines = [ "_CINDEX_LIB_" ]
+    defines += [ "_CINDEX_LIB_" ]
   }
 
   sources = [
Index: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-include-fixer/plugin/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-include-fixer/plugin/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-include-fixer/plugin/BUILD.gn
@@ -0,0 +1,18 @@
+static_library("plugin") {
+  output_name = "clangIncludeFixerPlugin"
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+    "//clang-tools-extra/clang-include-fixer",
+    "//clang/lib/AST",
+    "//clang/lib/Basic",
+    "//clang/lib/Frontend",
+    "//clang/lib/Parse",
+    "//clang/lib/Sema",
+    "//clang/lib/Tooling",
+    "//llvm/utils/gn/build/libs/pthread",
+  ]
+
+  sources = [
+    "IncludeFixerPlugin.cpp",
+  ]
+}
Index: llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
@@ -1,3 +1,5 @@
+import("//clang/lib/StaticAnalyzer/Frontend/enable.gni")
+
 static_library("plugin") {
   output_name = "clangTidyPlugin"
   configs += [ "//llvm/utils/gn/build:clang_code" ]
@@ -12,10 +14,12 @@
     "//clang-tools-extra/clang-tidy/fuchsia",
     "//clang-tools-extra/clang-tidy/google",
     "//clang-tools-extra/clang-tidy/hicpp",
+    "//clang-tools-extra/clang-tidy/linuxkernel",
     "//clang-tools-extra/clang-tidy/llvm",
     "//clang-tools-extra/clang-tidy/misc",
     "//clang-tools-extra/clang-tidy/modernize",
     "//clang-tools-extra/clang-tidy/objc",
+    "//clang-tools-extra/clang-tidy/openmp",
     "//clang-tools-extra/clang-tidy/performance",
     "//clang-tools-extra/clang-tidy/portability",
     "//clang-tools-extra/clang-tidy/readability",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65462.212391.patch
Type: text/x-patch
Size: 2798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190730/1e385e2c/attachment-0001.bin>


More information about the cfe-commits mailing list