[gn build] Add some llvm/tools: llvm-xray, sancov, sanstats, verify-uselistorder...
authorNico Weber <nicolasweber@gmx.de>
Wed, 2 Jan 2019 12:32:49 +0000 (12:32 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 2 Jan 2019 12:32:49 +0000 (12:32 +0000)
Also add build file for dependency llvm/lib/XRay.

Needed for check-llvm.

(yaml-bench is an llvm/util, not an llvm/tool.)

Differential Revision: https://reviews.llvm.org/D56163

llvm-svn: 350211

llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/llvm/lib/XRay/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/tools/llvm-xray/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/tools/sanstats/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/tools/verify-uselistorder/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/utils/yaml-bench/BUILD.gn [new file with mode: 0644]

index f4bc6b1..e56fedd 100644 (file)
@@ -11,6 +11,11 @@ group("default") {
     "//llvm/tools/llvm-rc",
     "//llvm/tools/llvm-rtdyld",
     "//llvm/tools/llvm-undname",
+    "//llvm/tools/llvm-xray",
+    "//llvm/tools/sancov",
+    "//llvm/tools/sanstats",
+    "//llvm/tools/verify-uselistorder",
+    "//llvm/utils/yaml-bench",
   ]
   if (clang_enable_arcmt) {
     deps += [
diff --git a/llvm/utils/gn/secondary/llvm/lib/XRay/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/XRay/BUILD.gn
new file mode 100644 (file)
index 0000000..c7907e3
--- /dev/null
@@ -0,0 +1,23 @@
+static_library("XRay") {
+  output_name = "LLVMXRay"
+  deps = [
+    "//llvm/lib/Object",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "BlockIndexer.cpp",
+    "BlockPrinter.cpp",
+    "BlockVerifier.cpp",
+    "FDRRecordProducer.cpp",
+    "FDRRecords.cpp",
+    "FDRTraceExpander.cpp",
+    "FDRTraceWriter.cpp",
+    "FileHeaderReader.cpp",
+    "InstrumentationMap.cpp",
+    "LogBuilderConsumer.cpp",
+    "Profile.cpp",
+    "RecordInitializer.cpp",
+    "RecordPrinter.cpp",
+    "Trace.cpp",
+  ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-xray/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-xray/BUILD.gn
new file mode 100644 (file)
index 0000000..89128bd
--- /dev/null
@@ -0,0 +1,23 @@
+executable("llvm-xray") {
+  deps = [
+    "//llvm/lib/DebugInfo/DWARF",
+    "//llvm/lib/DebugInfo/Symbolize",
+    "//llvm/lib/Object",
+    "//llvm/lib/Support",
+    "//llvm/lib/Target:TargetsToBuild",
+    "//llvm/lib/XRay",
+  ]
+  sources = [
+    "func-id-helper.cpp",
+    "llvm-xray.cpp",
+    "xray-account.cpp",
+    "xray-color-helper.cpp",
+    "xray-converter.cpp",
+    "xray-extract.cpp",
+    "xray-fdr-dump.cpp",
+    "xray-graph-diff.cpp",
+    "xray-graph.cpp",
+    "xray-registry.cpp",
+    "xray-stacks.cpp",
+  ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
new file mode 100644 (file)
index 0000000..c07af7b
--- /dev/null
@@ -0,0 +1,18 @@
+executable("sancov") {
+  deps = [
+    "//llvm/lib/DebugInfo/DWARF",
+    "//llvm/lib/DebugInfo/PDB",
+    "//llvm/lib/DebugInfo/Symbolize",
+    "//llvm/lib/MC",
+    "//llvm/lib/MC/MCDisassembler",
+    "//llvm/lib/Object",
+    "//llvm/lib/Support",
+    "//llvm/lib/Target:AllTargetsAsmPrinters",
+    "//llvm/lib/Target:AllTargetsDescs",
+    "//llvm/lib/Target:AllTargetsDisassemblers",
+    "//llvm/lib/Target:AllTargetsInfos",
+  ]
+  sources = [
+    "sancov.cpp",
+  ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/sanstats/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/sanstats/BUILD.gn
new file mode 100644 (file)
index 0000000..306775d
--- /dev/null
@@ -0,0 +1,9 @@
+executable("sanstats") {
+  deps = [
+    "//llvm/lib/DebugInfo/Symbolize",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "sanstats.cpp",
+  ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/tools/verify-uselistorder/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/verify-uselistorder/BUILD.gn
new file mode 100644 (file)
index 0000000..09fd489
--- /dev/null
@@ -0,0 +1,13 @@
+executable("verify-uselistorder") {
+  deps = [
+    "//llvm/lib/AsmParser",
+    "//llvm/lib/Bitcode/Reader",
+    "//llvm/lib/Bitcode/Writer",
+    "//llvm/lib/IR",
+    "//llvm/lib/IRReader",
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "verify-uselistorder.cpp",
+  ]
+}
diff --git a/llvm/utils/gn/secondary/llvm/utils/yaml-bench/BUILD.gn b/llvm/utils/gn/secondary/llvm/utils/yaml-bench/BUILD.gn
new file mode 100644 (file)
index 0000000..e388bf4
--- /dev/null
@@ -0,0 +1,8 @@
+executable("yaml-bench") {
+  deps = [
+    "//llvm/lib/Support",
+  ]
+  sources = [
+    "YAMLBench.cpp",
+  ]
+}