summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-12-14 14:04:43 -0500
committerNico Weber <thakis@chromium.org>2021-12-14 14:06:12 -0500
commit5ac14cd167c4cee2771868eeb0fa0e071e316e9c (patch)
tree391e25c3ae307281ea9c7ac5a562977c73ad9f5d
parenta82a19c137ad0b966847241c40546b3e145a17b5 (diff)
downloadllvm-5ac14cd167c4cee2771868eeb0fa0e071e316e9c.tar.gz
[gn build] (manually) port f0ca8d2461a7f3c8 (debuginfod-find)
-rw-r--r--llvm/utils/gn/secondary/BUILD.gn3
-rw-r--r--llvm/utils/gn/secondary/llvm/test/BUILD.gn2
-rw-r--r--llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod-find/BUILD.gn27
3 files changed, 32 insertions, 0 deletions
diff --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn
index 314ae8d82b24..40273d072b04 100644
--- a/llvm/utils/gn/secondary/BUILD.gn
+++ b/llvm/utils/gn/secondary/BUILD.gn
@@ -71,6 +71,9 @@ group("llvm-nm") {
group("llvm-cxxfilt") {
deps = [ "//llvm/tools/llvm-cxxfilt:symlinks" ]
}
+group("llvm-debuginfod-find") {
+ deps = [ "//llvm/tools/llvm-debuginfod-find:symlinks" ]
+}
group("llvm-objcopy") {
deps = [ "//llvm/tools/llvm-objcopy:symlinks" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 9d00ad55027b..542d800b1a8a 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -58,6 +58,7 @@ write_lit_config("lit_site_cfg") {
# (That check also checks LLVM_HOST_TRIPLE.)
"HOST_LDFLAGS=",
+ "LLVM_ENABLE_CURL=0",
"LLVM_ENABLE_FFI=0",
"LLVM_HAVE_OPT_VIEWER_MODULES=0",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
@@ -246,6 +247,7 @@ group("test") {
"//llvm/tools/llvm-cxxdump",
"//llvm/tools/llvm-cxxfilt",
"//llvm/tools/llvm-cxxmap",
+ "//llvm/tools/llvm-debuginfod-find:symlinks",
"//llvm/tools/llvm-diff",
"//llvm/tools/llvm-dis",
"//llvm/tools/llvm-dwarfdump",
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod-find/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod-find/BUILD.gn
new file mode 100644
index 000000000000..16b2c5343831
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod-find/BUILD.gn
@@ -0,0 +1,27 @@
+import("//llvm/tools/binutils_symlinks.gni")
+import("//llvm/utils/gn/build/symlink_or_copy.gni")
+
+if (llvm_install_binutils_symlinks) {
+ symlink_or_copy("debuginfod-find") {
+ deps = [ ":llvm-debuginfod-find" ]
+ source = "llvm-debuginfod-find"
+ output = "$root_out_dir/bin/debuginfod-find"
+ }
+}
+
+# //:llvm-debuginfod-find depends on this symlink target, see comment in
+# //BUILD.gn.
+group("symlinks") {
+ deps = [ ":llvm-debuginfod-find" ]
+ if (llvm_install_binutils_symlinks) {
+ deps += [ ":debuginfod-find" ]
+ }
+}
+
+executable("llvm-debuginfod-find") {
+ deps = [
+ "//llvm/lib/Debuginfod",
+ "//llvm/lib/Support",
+ ]
+ sources = [ "llvm-debuginfod-find.cpp" ]
+}