llvm.org GIT mirror llvm / 3921b24
[gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, llvm-modextract, llvm-profdata, llvm-symbolizer These are the llvm/tools needed by check-clang. Differential Revision: https://reviews.llvm.org/D56018 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349989 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 9 months ago
7 changed file(s) with 114 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1616 "//clang/lib/StaticAnalyzer/Frontend",
1717 "//clang/tools/clang-format",
1818 "//lld/test",
19 "//llvm/tools/llvm-cat",
20 "//llvm/tools/llvm-lto",
21 "//llvm/tools/llvm-lto2",
22 "//llvm/tools/llvm-modextract",
23 "//llvm/tools/llvm-profdata",
24 "//llvm/tools/llvm-symbolizer:symlinks",
1925 "//llvm/tools/llvm-undname",
2026 ]
2127 testonly = true
7379 "//llvm/tools/llvm-readobj:symlinks",
7480 ]
7581 }
82 group("llvm-symbolizer") {
83 deps = [
84 "//llvm/tools/llvm-symbolizer:symlinks",
85 ]
86 }
7687
7788 # A pool called "console" in the root BUILD.gn is magic and represents ninja's
7889 # built-in console pool. (Requires a GN with `gn --version` >= 552353.)
0 executable("llvm-cat") {
1 deps = [
2 "//llvm/lib/Bitcode/Reader",
3 "//llvm/lib/Bitcode/Writer",
4 "//llvm/lib/IR",
5 "//llvm/lib/IRReader",
6 "//llvm/lib/Support",
7 ]
8 sources = [
9 "llvm-cat.cpp",
10 ]
11 }
0 executable("llvm-lto") {
1 deps = [
2 "//llvm/lib/Bitcode/Reader",
3 "//llvm/lib/Bitcode/Writer",
4 "//llvm/lib/IR",
5 "//llvm/lib/IRReader",
6 "//llvm/lib/LTO",
7 "//llvm/lib/MC",
8 "//llvm/lib/Object",
9 "//llvm/lib/Support",
10 "//llvm/lib/Target",
11 "//llvm/lib/Target:TargetsToBuild",
12 ]
13 sources = [
14 "llvm-lto.cpp",
15 ]
16 }
0 executable("llvm-lto2") {
1 deps = [
2 "//llvm/lib/Bitcode/Reader",
3 "//llvm/lib/IR",
4 "//llvm/lib/LTO",
5 "//llvm/lib/Linker",
6 "//llvm/lib/MC",
7 "//llvm/lib/Object",
8 "//llvm/lib/Support",
9 "//llvm/lib/Target",
10 "//llvm/lib/Target:TargetsToBuild",
11 ]
12 sources = [
13 "llvm-lto2.cpp",
14 ]
15 }
0 executable("llvm-modextract") {
1 deps = [
2 "//llvm/lib/Bitcode/Reader",
3 "//llvm/lib/Bitcode/Writer",
4 "//llvm/lib/IR",
5 "//llvm/lib/IRReader",
6 "//llvm/lib/Support",
7 ]
8 sources = [
9 "llvm-modextract.cpp",
10 ]
11 }
0 executable("llvm-profdata") {
1 deps = [
2 "//llvm/lib/IR",
3 "//llvm/lib/ProfileData",
4 "//llvm/lib/Support",
5 ]
6 sources = [
7 "llvm-profdata.cpp",
8 ]
9 }
0 import("//llvm/tools/binutils_symlinks.gni")
1 import("//llvm/utils/gn/build/symlink_or_copy.gni")
2
3 if (llvm_install_binutils_symlinks) {
4 symlink_or_copy("addr2line") {
5 deps = [
6 ":llvm-symbolizer",
7 ]
8 source = "llvm-symbolizer"
9 output = "$root_out_dir/bin/addr2line"
10 }
11 }
12
13 # //:llvm-symbolizer depends on this symlink target, see comment in //BUILD.gn.
14 group("symlinks") {
15 deps = [
16 ":llvm-symbolizer",
17 ]
18 if (llvm_install_binutils_symlinks) {
19 deps += [ ":addr2line" ]
20 }
21 }
22
23 executable("llvm-symbolizer") {
24 deps = [
25 "//llvm/lib/DebugInfo/DWARF",
26 "//llvm/lib/DebugInfo/PDB",
27 "//llvm/lib/DebugInfo/Symbolize",
28 "//llvm/lib/Demangle",
29 "//llvm/lib/Object",
30 "//llvm/lib/Support",
31 ]
32 sources = [
33 "llvm-symbolizer.cpp",
34 ]
35 }