Skip to content

Commit aa5eff9

Browse files
committed
[gn] port ed8f788 (rm clang-pseudo)
1 parent 4caf7cc commit aa5eff9

File tree

13 files changed

+0
-280
lines changed

13 files changed

+0
-280
lines changed

llvm/utils/gn/secondary/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import("//llvm/utils/gn/build/toolchain/compiler.gni")
55
group("default") {
66
deps = [
77
"//clang-tools-extra/clangd/test",
8-
"//clang-tools-extra/pseudo/test",
98
"//clang-tools-extra/test",
109
"//clang/test",
1110
"//clang/tools/scan-build",

llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ static_library("clangd") {
4444
"//clang-tools-extra/clang-tidy:clang-tidy-config",
4545
"//clang-tools-extra/clangd/support",
4646
"//clang-tools-extra/include-cleaner/lib",
47-
"//clang-tools-extra/pseudo/lib",
4847
"//clang/lib/AST",
4948
"//clang/lib/ASTMatchers",
5049
"//clang/lib/Basic",
@@ -73,9 +72,6 @@ static_library("clangd") {
7372
# For "clang-include-cleaner/..." includes.
7473
"//clang-tools-extra/include-cleaner/include",
7574

76-
# For "clang-pseudo/..." includes.
77-
"//clang-tools-extra/pseudo/include",
78-
7975
# To pick up the generated inc files.
8076
"$target_gen_dir/tool",
8177
]
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
executable("clang-pseudo-gen") {
2-
configs += [ "//llvm/utils/gn/build:clang_code" ]
3-
deps = [
4-
"//clang-tools-extra/pseudo/lib/grammar",
5-
"//llvm/lib/Support",
6-
]
7-
include_dirs = [ "../include" ]
8-
sources = [ "Main.cpp" ]
9-
}
Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +0,0 @@
1-
import("//llvm/utils/gn/build/compiled_action.gni")
2-
3-
template("gen") {
4-
compiled_action(target_name) {
5-
tool = "//clang-tools-extra/pseudo/gen:clang-pseudo-gen"
6-
inputs = [ "../lib/cxx/cxx.bnf" ]
7-
outputs = [ "$target_gen_dir/$target_name" ]
8-
args = [
9-
"--grammar",
10-
rebase_path(inputs[0], root_build_dir),
11-
"-o",
12-
rebase_path(outputs[0], root_build_dir),
13-
invoker.flag,
14-
]
15-
}
16-
}
17-
18-
gen("CXXSymbols.inc") {
19-
flag = "--emit-symbol-list"
20-
}
21-
22-
gen("CXXBNF.inc") {
23-
flag = "--emit-grammar-content"
24-
}
25-
26-
config("cxx_gen_config") {
27-
visibility = [ ":cxx_gen" ]
28-
include_dirs = [ target_gen_dir ]
29-
}
30-
31-
group("cxx_gen") {
32-
deps = [
33-
":CXXBNF.inc",
34-
":CXXSymbols.inc",
35-
]
36-
37-
# Let targets depending on this find the generated files.
38-
public_configs = [ ":cxx_gen_config" ]
39-
}
Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
static_library("lib") {
2-
output_name = "clangPseudo"
3-
configs += [ "//llvm/utils/gn/build:clang_code" ]
4-
deps = [
5-
"//clang-tools-extra/pseudo/lib/grammar",
6-
"//clang/lib/Basic",
7-
"//clang/lib/Lex",
8-
"//llvm/lib/Support",
9-
]
10-
include_dirs = [ "../include" ]
11-
sources = [
12-
"Bracket.cpp",
13-
"DirectiveTree.cpp",
14-
"Disambiguate.cpp",
15-
"Forest.cpp",
16-
"GLR.cpp",
17-
"Lex.cpp",
18-
"Token.cpp",
19-
]
20-
}
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +0,0 @@
1-
static_library("cli") {
2-
output_name = "clangPseudoCLI"
3-
configs += [ "//llvm/utils/gn/build:clang_code" ]
4-
deps = [
5-
"//clang-tools-extra/pseudo/lib/cxx",
6-
"//clang-tools-extra/pseudo/lib/grammar",
7-
"//llvm/lib/Support",
8-
]
9-
include_dirs = [ "../../include" ]
10-
sources = [ "CLI.cpp" ]
11-
}
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
static_library("cxx") {
2-
output_name = "clangPseudoCXX"
3-
configs += [ "//llvm/utils/gn/build:clang_code" ]
4-
deps = [
5-
"//clang-tools-extra/pseudo/lib/grammar",
6-
"//llvm/lib/Support",
7-
]
8-
9-
# public_deps because this target's public headers include generated headers.
10-
public_deps = [ "//clang-tools-extra/pseudo/include:cxx_gen" ]
11-
include_dirs = [ "../../include" ]
12-
sources = [ "CXX.cpp" ]
13-
}
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +0,0 @@
1-
static_library("grammar") {
2-
output_name = "clangPseudoGrammar"
3-
configs += [ "//llvm/utils/gn/build:clang_code" ]
4-
deps = [
5-
"//clang/include/clang/Basic:RegularKeywordAttrInfo",
6-
"//llvm/lib/Support",
7-
]
8-
include_dirs = [ "../../include" ]
9-
sources = [
10-
"Grammar.cpp",
11-
"GrammarBNF.cpp",
12-
"LRGraph.cpp",
13-
"LRTable.cpp",
14-
"LRTableBuild.cpp",
15-
]
16-
}
Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +0,0 @@
1-
import("//llvm/triples.gni")
2-
import("//llvm/utils/gn/build/write_cmake_config.gni")
3-
import("clang_pseudo_lit_site_cfg_files.gni")
4-
5-
template("write_lit_config") {
6-
write_cmake_config(target_name) {
7-
input = invoker.input
8-
output = invoker.output
9-
values = [
10-
"LIT_SITE_CFG_IN_HEADER=## Autogenerated from $input, do not edit",
11-
"LLVM_LIBS_DIR=", # needed only for shared builds
12-
]
13-
values += invoker.extra_values
14-
}
15-
}
16-
17-
write_lit_config("lit_site_cfg") {
18-
# Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
19-
input = "//clang-tools-extra/pseudo/test/lit.site.cfg.py.in"
20-
output = clang_pseudo_lit_site_cfg_file
21-
22-
extra_values = [
23-
"CMAKE_CURRENT_BINARY_DIR=" +
24-
rebase_path(get_label_info("//clang-tools-extra/pseudo/test",
25-
"target_out_dir")),
26-
"CMAKE_CURRENT_SOURCE_DIR=" +
27-
rebase_path("//clang-tools-extra/pseudo/test"),
28-
29-
"CURRENT_TOOLS_DIR=",
30-
"LLVM_LIT_TOOLS_DIR=", # Intentionally empty, matches cmake build.
31-
"LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
32-
"TARGET_TRIPLE=$llvm_target_triple",
33-
"Python3_EXECUTABLE=$python_path",
34-
]
35-
}
36-
37-
write_lit_config("lit_unit_site_cfg") {
38-
# Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
39-
input = "//clang-tools-extra/pseudo/test/Unit/lit.site.cfg.py.in"
40-
output = clang_pseudo_lit_unit_site_cfg_file
41-
extra_values = [
42-
"CMAKE_CURRENT_BINARY_DIR=" +
43-
rebase_path(get_label_info("//clang-tools-extra/pseudo/unittests",
44-
"target_out_dir")),
45-
"CMAKE_CURRENT_SOURCE_DIR=" +
46-
rebase_path("//clang-tools-extra/pseudo/test"),
47-
]
48-
if (host_os == "win") {
49-
# See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
50-
extra_values += [ "SHLIBDIR=" + rebase_path("$root_out_dir/bin") ]
51-
} else {
52-
extra_values += [ "SHLIBDIR=" + rebase_path("$root_out_dir/lib") ]
53-
}
54-
}
55-
56-
# This target should contain all dependencies of check-pseudo.
57-
# //:default depends on it, so that ninja's default target builds all
58-
# prerequisites for check-clang but doesn't run check-clang itself.
59-
group("test") {
60-
deps = [
61-
":lit_site_cfg",
62-
":lit_unit_site_cfg",
63-
"//clang-tools-extra/pseudo/tool:clang-pseudo",
64-
"//clang-tools-extra/pseudo/unittests:ClangPseudoTests",
65-
"//llvm/utils/FileCheck",
66-
"//llvm/utils/llvm-lit",
67-
"//llvm/utils/not",
68-
]
69-
testonly = true
70-
}
71-
72-
action("check-clang-pseudo") {
73-
script = "$root_out_dir/bin/llvm-lit"
74-
if (host_os == "win") {
75-
script += ".py"
76-
}
77-
args = [
78-
"-sv",
79-
rebase_path(get_path_info(clang_pseudo_lit_site_cfg_file, "dir"),
80-
root_out_dir),
81-
]
82-
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it
83-
# each time.
84-
85-
# Since check-clang-pseudo is always dirty, //:default doesn't depend on it so
86-
# that it's not part of the default ninja target. Hence, check-clang-pseudo
87-
# shouldn't have any deps except :test. so that the default target is sure to
88-
# build all the deps.
89-
deps = [ ":test" ]
90-
testonly = true
91-
92-
pool = "//:console"
93-
}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
clang_pseudo_lit_site_cfg_file =
2-
"$root_gen_dir/clang-tools-extra/pseudo/test/lit.site.cfg.py"
3-
clang_pseudo_lit_unit_site_cfg_file =
4-
"$root_gen_dir/clang-tools-extra/pseudo/test/Unit/lit.site.cfg.py"
Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +0,0 @@
1-
action("HTMLForestResources") {
2-
script = "//clang/utils/bundle_resources.py"
3-
inputs = [
4-
"HTMLForest.css",
5-
"HTMLForest.js",
6-
"HTMLForest.html",
7-
]
8-
outputs = [ "$target_gen_dir/HTMLForestResources.inc" ]
9-
args =
10-
rebase_path(outputs, root_build_dir) + rebase_path(inputs, root_build_dir)
11-
}
12-
13-
executable("clang-pseudo") {
14-
configs += [ "//llvm/utils/gn/build:clang_code" ]
15-
deps = [
16-
":HTMLForestResources",
17-
"//clang-tools-extra/pseudo/lib",
18-
"//clang-tools-extra/pseudo/lib/cli",
19-
"//clang/lib/Basic",
20-
"//llvm/lib/Support",
21-
]
22-
include_dirs = [
23-
"../include",
24-
25-
# To pick up HTMLForestResources.inc:
26-
target_gen_dir,
27-
]
28-
sources = [
29-
"ClangPseudo.cpp",
30-
"HTMLForest.cpp",
31-
]
32-
}
Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +0,0 @@
1-
import("//third-party/unittest/unittest.gni")
2-
3-
unittest("ClangPseudoTests") {
4-
configs += [ "//llvm/utils/gn/build:clang_code" ]
5-
deps = [
6-
"//clang-tools-extra/pseudo/lib",
7-
"//clang-tools-extra/pseudo/lib/cxx",
8-
"//clang/lib/Basic",
9-
"//clang/lib/Lex",
10-
"//clang/lib/Testing",
11-
"//llvm/lib/Support",
12-
"//llvm/lib/Testing/Annotations",
13-
"//llvm/lib/Testing/Support",
14-
]
15-
include_dirs = [ "../include" ]
16-
sources = [
17-
"BracketTest.cpp",
18-
"CXXTest.cpp",
19-
"DirectiveTreeTest.cpp",
20-
"DisambiguateTest.cpp",
21-
"ForestTest.cpp",
22-
"GLRTest.cpp",
23-
"GrammarTest.cpp",
24-
"LRTableTest.cpp",
25-
"TokenTest.cpp",
26-
]
27-
}

llvm/utils/gn/secondary/llvm/utils/llvm-lit/BUILD.gn

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import("//bolt/test/bolt_lit_site_cfg_files.gni")
22
import("//clang-tools-extra/clangd/test/clangd_lit_site_cfg_files.gni")
3-
import("//clang-tools-extra/pseudo/test/clang_pseudo_lit_site_cfg_files.gni")
43
import("//clang-tools-extra/test/clang_tools_extra_lit_site_cfg_files.gni")
54
import("//clang/test/clang_lit_site_cfg_files.gni")
65
import("//lld/test/lld_lit_site_cfg_files.gni")
@@ -24,8 +23,6 @@ write_cmake_config("llvm-lit") {
2423
deps += [
2524
"//clang-tools-extra/clangd/test:lit_site_cfg",
2625
"//clang-tools-extra/clangd/test:lit_unit_site_cfg",
27-
"//clang-tools-extra/pseudo/test:lit_site_cfg",
28-
"//clang-tools-extra/pseudo/test:lit_unit_site_cfg",
2926
"//clang-tools-extra/test:lit_site_cfg",
3027
"//clang-tools-extra/test:lit_unit_site_cfg",
3128
"//clang/test:lit_site_cfg",
@@ -65,14 +62,6 @@ write_cmake_config("llvm-lit") {
6562
"//clang-tools-extra/clangd/unittests/lit.cfg.py",
6663
clangd_lit_unit_site_cfg_file,
6764
],
68-
[
69-
"//clang-tools-extra/pseudo/test/lit.cfg.py",
70-
clang_pseudo_lit_site_cfg_file,
71-
],
72-
[
73-
"//clang-tools-extra/pseudo/test/Unit/lit.cfg.py",
74-
clang_pseudo_lit_unit_site_cfg_file,
75-
],
7665
[
7766
"//clang/test/lit.cfg.py",
7867
clang_lit_site_cfg_file,

0 commit comments

Comments
 (0)