[llvm] 8ac330b - [Debuginfod][CMake] Don't build a defunct llvm-debuginfod
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 16:18:27 PDT 2023
Author: Daniel Thornburgh
Date: 2023-03-29T16:18:21-07:00
New Revision: 8ac330bde40e9e0a0b2d0708ba6c7888fb1ce225
URL: https://github.com/llvm/llvm-project/commit/8ac330bde40e9e0a0b2d0708ba6c7888fb1ce225
DIFF: https://github.com/llvm/llvm-project/commit/8ac330bde40e9e0a0b2d0708ba6c7888fb1ce225.diff
LOG: [Debuginfod][CMake] Don't build a defunct llvm-debuginfod
llvm-debuginfod intrinsically requires cpp-httplib to operate, so
exclude the target if it's unavailable. Right now the tool walks off an
llvm_unreachable.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D147185
Added:
Modified:
llvm/test/CMakeLists.txt
llvm/test/lit.cfg.py
llvm/tools/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 9339940baf584..2ac51aafa4f37 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -79,7 +79,6 @@ set(LLVM_TEST_DEPENDS
llvm-cxxfilt
llvm-cxxmap
llvm-debuginfo-analyzer
- llvm-debuginfod
llvm-debuginfod-find
llvm-
diff
llvm-dis
@@ -220,6 +219,10 @@ if (LLVM_INCLUDE_DXIL_TESTS)
list(APPEND LLVM_TEST_DEPENDS dxil-dis)
endif()
+if(LLVM_ENABLE_HTTPLIB)
+ list(APPEND LLVM_TEST_DEPENDS llvm-debuginfod)
+endif()
+
add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 3aa82ab030d2b..a5764052344bf 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -158,7 +158,7 @@ def get_asan_rtlib():
tools.extend([
'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as',
'llvm-addr2line', 'llvm-bcanalyzer', 'llvm-bitcode-strip', 'llvm-config',
- 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-debuginfod-find', 'llvm-debuginfod',
+ 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-debuginfod-find',
'llvm-debuginfo-analyzer',
'llvm-
diff ', 'llvm-dis', 'llvm-dwarfdump', 'llvm-dwarfutil', 'llvm-dlltool',
'llvm-exegesis', 'llvm-extract', 'llvm-isel-fuzzer', 'llvm-ifs',
@@ -176,6 +176,7 @@ def get_asan_rtlib():
# The following tools are optional
tools.extend([
ToolSubst('llvm-mt', unresolved='ignore'),
+ ToolSubst('llvm-debuginfod', unresolved='ignore'),
ToolSubst('Kaleidoscope-Ch3', unresolved='ignore'),
ToolSubst('Kaleidoscope-Ch4', unresolved='ignore'),
ToolSubst('Kaleidoscope-Ch5', unresolved='ignore'),
diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt
index c6116ac81d12b..2113b6a33e902 100644
--- a/llvm/tools/CMakeLists.txt
+++ b/llvm/tools/CMakeLists.txt
@@ -21,6 +21,10 @@ if(CYGWIN OR NOT LLVM_ENABLE_PIC)
set(LLVM_TOOL_LTO_BUILD Off)
endif()
+if(NOT LLVM_ENABLE_HTTPLIB)
+ set(LLVM_TOOL_LLVM_DEBUGINFOD_BUILD Off)
+endif()
+
if (LLVM_TOOL_LLVM_DRIVER_BUILD)
add_llvm_tool(llvm-driver)
endif()
More information about the llvm-commits
mailing list