[llvm] 5812f9f - [gn build] (manually) port 36f01909a0e2 (llvm-debuginfod)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 14:31:41 PDT 2022
Author: Nico Weber
Date: 2022-07-07T23:31:33+02:00
New Revision: 5812f9f10a22ae8f5364554ccd4e79a8a1f160c9
URL: https://github.com/llvm/llvm-project/commit/5812f9f10a22ae8f5364554ccd4e79a8a1f160c9
DIFF: https://github.com/llvm/llvm-project/commit/5812f9f10a22ae8f5364554ccd4e79a8a1f160c9.diff
LOG: [gn build] (manually) port 36f01909a0e2 (llvm-debuginfod)
LLVM_ENABLE_HTTPLIB is always off in the GN build. This means the
test for this won't run, so it's not really necessary to add the
llvm-debuginfod binary (and the binary might not even be that
interesting with LLVM_ENABLE_HTTPLIB off). But maybe we want
to add support for LLVM_ENABLE_HTTPLIB at some point, so let's
add the binary too. (Usually we wouldn't, since it's not needed
to get tests to pass.)
Added:
llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod/BUILD.gn
Modified:
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/llvm/test/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn
index 21bb95d903411..c7ead71d66962 100644
--- a/llvm/utils/gn/secondary/BUILD.gn
+++ b/llvm/utils/gn/secondary/BUILD.gn
@@ -75,6 +75,9 @@ group("llvm-nm") {
group("llvm-cxxfilt") {
deps = [ "//llvm/tools/llvm-cxxfilt:symlinks" ]
}
+group("llvm-debuginfod") {
+ deps = [ "//llvm/tools/llvm-debuginfod:symlinks" ]
+}
group("llvm-debuginfod-find") {
deps = [ "//llvm/tools/llvm-debuginfod-find:symlinks" ]
}
diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 85f2dbfb83f2e..54a36f4733284 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -60,6 +60,7 @@ write_lit_config("lit_site_cfg") {
"HOST_LDFLAGS=",
"LLVM_ENABLE_FFI=0",
+ "LLVM_ENABLE_HTTPLIB=0",
"LLVM_HAVE_OPT_VIEWER_MODULES=0",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_INCLUDE_DXIL_TESTS=0",
@@ -256,6 +257,7 @@ group("test") {
"//llvm/tools/llvm-cxxdump",
"//llvm/tools/llvm-cxxfilt",
"//llvm/tools/llvm-cxxmap",
+ "//llvm/tools/llvm-debuginfod:symlinks",
"//llvm/tools/llvm-debuginfod-find:symlinks",
"//llvm/tools/llvm-
diff ",
"//llvm/tools/llvm-dis",
diff --git a/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod/BUILD.gn
new file mode 100644
index 0000000000000..c8ee330a867cb
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod/BUILD.gn
@@ -0,0 +1,26 @@
+import("//llvm/tools/binutils_symlinks.gni")
+import("//llvm/utils/gn/build/symlink_or_copy.gni")
+
+if (llvm_install_binutils_symlinks) {
+ symlink_or_copy("debuginfod") {
+ deps = [ ":llvm-debuginfod" ]
+ source = "llvm-debuginfod"
+ output = "$root_out_dir/bin/debuginfod"
+ }
+}
+
+# //:llvm-debuginfod depends on this symlink target, see comment in //BUILD.gn.
+group("symlinks") {
+ deps = [ ":llvm-debuginfod" ]
+ if (llvm_install_binutils_symlinks) {
+ deps += [ ":debuginfod" ]
+ }
+}
+
+executable("llvm-debuginfod") {
+ deps = [
+ "//llvm/lib/Debuginfod",
+ "//llvm/lib/Support",
+ ]
+ sources = [ "llvm-debuginfod.cpp" ]
+}
More information about the llvm-commits
mailing list