[llvm] r349989 - [gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, llvm-modextract, llvm-profdata, llvm-symbolizer
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 19:40:36 PST 2018
Author: nico
Date: Fri Dec 21 19:40:35 2018
New Revision: 349989
URL: http://llvm.org/viewvc/llvm-project?rev=349989&view=rev
Log:
[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
Added:
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn
Modified:
llvm/trunk/utils/gn/secondary/BUILD.gn
Modified: llvm/trunk/utils/gn/secondary/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/BUILD.gn?rev=349989&r1=349988&r2=349989&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -17,6 +17,12 @@ group("default") {
"//clang/lib/StaticAnalyzer/Frontend",
"//clang/tools/clang-format",
"//lld/test",
+ "//llvm/tools/llvm-cat",
+ "//llvm/tools/llvm-lto",
+ "//llvm/tools/llvm-lto2",
+ "//llvm/tools/llvm-modextract",
+ "//llvm/tools/llvm-profdata",
+ "//llvm/tools/llvm-symbolizer:symlinks",
"//llvm/tools/llvm-undname",
]
testonly = true
@@ -74,6 +80,11 @@ group("llvm-readobj") {
"//llvm/tools/llvm-readobj:symlinks",
]
}
+group("llvm-symbolizer") {
+ deps = [
+ "//llvm/tools/llvm-symbolizer:symlinks",
+ ]
+}
# A pool called "console" in the root BUILD.gn is magic and represents ninja's
# built-in console pool. (Requires a GN with `gn --version` >= 552353.)
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-cat/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,12 @@
+executable("llvm-cat") {
+ deps = [
+ "//llvm/lib/Bitcode/Reader",
+ "//llvm/lib/Bitcode/Writer",
+ "//llvm/lib/IR",
+ "//llvm/lib/IRReader",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "llvm-cat.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,17 @@
+executable("llvm-lto") {
+ deps = [
+ "//llvm/lib/Bitcode/Reader",
+ "//llvm/lib/Bitcode/Writer",
+ "//llvm/lib/IR",
+ "//llvm/lib/IRReader",
+ "//llvm/lib/LTO",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target:TargetsToBuild",
+ ]
+ sources = [
+ "llvm-lto.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,16 @@
+executable("llvm-lto2") {
+ deps = [
+ "//llvm/lib/Bitcode/Reader",
+ "//llvm/lib/IR",
+ "//llvm/lib/LTO",
+ "//llvm/lib/Linker",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target:TargetsToBuild",
+ ]
+ sources = [
+ "llvm-lto2.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-modextract/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,12 @@
+executable("llvm-modextract") {
+ deps = [
+ "//llvm/lib/Bitcode/Reader",
+ "//llvm/lib/Bitcode/Writer",
+ "//llvm/lib/IR",
+ "//llvm/lib/IRReader",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "llvm-modextract.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-profdata/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,10 @@
+executable("llvm-profdata") {
+ deps = [
+ "//llvm/lib/IR",
+ "//llvm/lib/ProfileData",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "llvm-profdata.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn?rev=349989&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn Fri Dec 21 19:40:35 2018
@@ -0,0 +1,36 @@
+import("//llvm/tools/binutils_symlinks.gni")
+import("//llvm/utils/gn/build/symlink_or_copy.gni")
+
+if (llvm_install_binutils_symlinks) {
+ symlink_or_copy("addr2line") {
+ deps = [
+ ":llvm-symbolizer",
+ ]
+ source = "llvm-symbolizer"
+ output = "$root_out_dir/bin/addr2line"
+ }
+}
+
+# //:llvm-symbolizer depends on this symlink target, see comment in //BUILD.gn.
+group("symlinks") {
+ deps = [
+ ":llvm-symbolizer",
+ ]
+ if (llvm_install_binutils_symlinks) {
+ deps += [ ":addr2line" ]
+ }
+}
+
+executable("llvm-symbolizer") {
+ deps = [
+ "//llvm/lib/DebugInfo/DWARF",
+ "//llvm/lib/DebugInfo/PDB",
+ "//llvm/lib/DebugInfo/Symbolize",
+ "//llvm/lib/Demangle",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "llvm-symbolizer.cpp",
+ ]
+}
More information about the llvm-commits
mailing list