[llvm] d3ae856 - [gn] port 939dce12f9f3 (clangd uses include-cleaner)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 05:46:27 PST 2023


Author: Nico Weber
Date: 2023-01-19T08:46:12-05:00
New Revision: d3ae8566b07d1dc66d26a876b41424fee2c5897e

URL: https://github.com/llvm/llvm-project/commit/d3ae8566b07d1dc66d26a876b41424fee2c5897e
DIFF: https://github.com/llvm/llvm-project/commit/d3ae8566b07d1dc66d26a876b41424fee2c5897e.diff

LOG: [gn] port 939dce12f9f3 (clangd uses include-cleaner)

Added: 
    llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/lib/BUILD.gn

Modified: 
    llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
    llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
    llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
index 64093c36ea267..b64355fded628 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
@@ -43,6 +43,7 @@ static_library("clangd") {
     "//clang-tools-extra/clang-tidy:all-checks",
     "//clang-tools-extra/clang-tidy:clang-tidy-config",
     "//clang-tools-extra/clangd/support",
+    "//clang-tools-extra/include-cleaner/lib",
     "//clang-tools-extra/pseudo/lib",
     "//clang/lib/AST",
     "//clang/lib/ASTMatchers",
@@ -68,6 +69,9 @@ static_library("clangd") {
   include_dirs = [
     ".",
 
+    # For "clang-include-cleaner/..." includes.
+    "//clang-tools-extra/include-cleaner/include",
+
     # For "clang-pseudo/..." includes.
     "//clang-tools-extra/pseudo/include",
 

diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
index 7ad4e5cfd1222..ee3f3aa90f899 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
@@ -11,7 +11,12 @@ source_set("tweaks") {
     "//clang/lib/Tooling/Core",
     "//llvm/lib/Support",
   ]
-  include_dirs = [ "../.." ]
+  include_dirs = [
+    "../..",
+
+    # For "clang-include-cleaner/..." includes.
+    "//clang-tools-extra/include-cleaner/include",
+  ]
   sources = [
     "AddUsing.cpp",
     "AnnotateHighlightings.cpp",

diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn
index 856e46eaf6eb6..b0d9f056f2aa8 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn
@@ -25,7 +25,12 @@ executable("clangd") {
     ]
   }
 
-  include_dirs = [ ".." ]
+  include_dirs = [
+    "..",
+
+    # For "clang-include-cleaner/..." includes.
+    "//clang-tools-extra/include-cleaner/include",
+  ]
   sources = [
     "Check.cpp",
     "ClangdMain.cpp",

diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/lib/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/lib/BUILD.gn
new file mode 100644
index 0000000000000..8f613c9664c0d
--- /dev/null
+++ b/llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/lib/BUILD.gn
@@ -0,0 +1,23 @@
+static_library("lib") {
+  output_name = "clangIncludeCleaner"
+  configs += [ "//llvm/utils/gn/build:clang_code" ]
+  deps = [
+    "//clang/lib/AST",
+    "//clang/lib/Basic",
+    "//clang/lib/Format",
+    "//clang/lib/Tooling/Core",
+    "//clang/lib/Tooling/Inclusions",
+    "//clang/lib/Tooling/Inclusions/Stdlib",
+    "//llvm/lib/Support",
+  ]
+  include_dirs = [ "../include" ]
+  sources = [
+    "Analysis.cpp",
+    "FindHeaders.cpp",
+    "HTMLReport.cpp",
+    "LocateSymbol.cpp",
+    "Record.cpp",
+    "Types.cpp",
+    "WalkAST.cpp",
+  ]
+}


        


More information about the llvm-commits mailing list