[gn] port 939dce12f9f3 (clangd uses include-cleaner)
authorNico Weber <thakis@chromium.org>
Thu, 19 Jan 2023 13:45:56 +0000 (08:45 -0500)
committerNico Weber <thakis@chromium.org>
Thu, 19 Jan 2023 13:46:12 +0000 (08:46 -0500)
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
llvm/utils/gn/secondary/clang-tools-extra/include-cleaner/lib/BUILD.gn [new file with mode: 0644]

index 64093c3..b64355f 100644 (file)
@@ -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",
 
index 7ad4e5c..ee3f3aa 100644 (file)
@@ -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",
index 856e46e..b0d9f05 100644 (file)
@@ -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 (file)
index 0000000..8f613c9
--- /dev/null
@@ -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",
+  ]
+}