[clang-tools-extra] 180bae0 - [gn build] (manually) port b94db7ed7eaf (Confusables.inc)
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 04:49:45 PDT 2022
Author: Nico Weber
Date: 2022-06-03T07:49:28-04:00
New Revision: 180bae08a04d4dc724cb5e6f2ea9df8641a3f657
URL: https://github.com/llvm/llvm-project/commit/180bae08a04d4dc724cb5e6f2ea9df8641a3f657
DIFF: https://github.com/llvm/llvm-project/commit/180bae08a04d4dc724cb5e6f2ea9df8641a3f657.diff
LOG: [gn build] (manually) port b94db7ed7eaf (Confusables.inc)
Added:
llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn
Modified:
clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt b/clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
index 5d6be0c8548fa..05eecddd18603 100644
--- a/clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
+++ b/clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
@@ -1 +1,3 @@
-add_llvm_executable(make_confusable_table build_confusable_table.cpp)
+add_llvm_executable(make_confusable_table
+ build_confusable_table.cpp
+ )
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn
index 5463d61e5ff84..a99b254a1b547 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/BUILD.gn
@@ -1,7 +1,26 @@
+action("Confusables.inc") {
+ gen_target = "ConfusableTable:make_confusable_table($host_toolchain)"
+ gen_executable = get_label_info(gen_target, "root_out_dir") +
+ "/bin/" + get_label_info(gen_target, "name")
+ deps = [ gen_target ]
+
+ # FIXME: Rename this script, now that it's used for other things.
+ script = "//llvm/utils/gn/build/run_tablegen.py"
+ sources = [ "ConfusableTable/confusables.txt" ]
+ outputs = [ "$target_gen_dir/$target_name" ]
+ args = [
+ rebase_path(gen_executable, root_build_dir),
+ rebase_path(sources[0], root_build_dir),
+ rebase_path(outputs[0], root_build_dir),
+ ]
+}
+
static_library("misc") {
output_name = "clangTidyMiscModule"
configs += [ "//llvm/utils/gn/build:clang_code" ]
+ include_dirs = [ target_gen_dir ]
deps = [
+ ":Confusables.inc",
"//clang-tools-extra/clang-tidy",
"//clang-tools-extra/clang-tidy/utils",
"//clang/lib/AST",
@@ -15,6 +34,7 @@ static_library("misc") {
]
sources = [
"DefinitionsInHeadersCheck.cpp",
+ "Homoglyph.cpp",
"MiscTidyModule.cpp",
"MisleadingBidirectional.cpp",
"MisleadingIdentifier.cpp",
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn
new file mode 100644
index 0000000000000..e07cd98f824ad
--- /dev/null
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/misc/ConfusableTable/BUILD.gn
@@ -0,0 +1,4 @@
+executable("make_confusable_table") {
+ deps = [ "//llvm/lib/Support" ]
+ sources = [ "build_confusable_table.cpp" ]
+}
More information about the cfe-commits
mailing list