Skip to content

Commit 8ac330b

Browse files
committed
[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
1 parent 0ce6b27 commit 8ac330b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

llvm/test/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ set(LLVM_TEST_DEPENDS
7979
llvm-cxxfilt
8080
llvm-cxxmap
8181
llvm-debuginfo-analyzer
82-
llvm-debuginfod
8382
llvm-debuginfod-find
8483
llvm-diff
8584
llvm-dis
@@ -220,6 +219,10 @@ if (LLVM_INCLUDE_DXIL_TESTS)
220219
list(APPEND LLVM_TEST_DEPENDS dxil-dis)
221220
endif()
222221

222+
if(LLVM_ENABLE_HTTPLIB)
223+
list(APPEND LLVM_TEST_DEPENDS llvm-debuginfod)
224+
endif()
225+
223226
add_custom_target(llvm-test-depends DEPENDS ${LLVM_TEST_DEPENDS})
224227
set_target_properties(llvm-test-depends PROPERTIES FOLDER "Tests")
225228

llvm/test/lit.cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def get_asan_rtlib():
158158
tools.extend([
159159
'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as',
160160
'llvm-addr2line', 'llvm-bcanalyzer', 'llvm-bitcode-strip', 'llvm-config',
161-
'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-debuginfod-find', 'llvm-debuginfod',
161+
'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-debuginfod-find',
162162
'llvm-debuginfo-analyzer',
163163
'llvm-diff', 'llvm-dis', 'llvm-dwarfdump', 'llvm-dwarfutil', 'llvm-dlltool',
164164
'llvm-exegesis', 'llvm-extract', 'llvm-isel-fuzzer', 'llvm-ifs',
@@ -176,6 +176,7 @@ def get_asan_rtlib():
176176
# The following tools are optional
177177
tools.extend([
178178
ToolSubst('llvm-mt', unresolved='ignore'),
179+
ToolSubst('llvm-debuginfod', unresolved='ignore'),
179180
ToolSubst('Kaleidoscope-Ch3', unresolved='ignore'),
180181
ToolSubst('Kaleidoscope-Ch4', unresolved='ignore'),
181182
ToolSubst('Kaleidoscope-Ch5', unresolved='ignore'),

llvm/tools/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ if(CYGWIN OR NOT LLVM_ENABLE_PIC)
2121
set(LLVM_TOOL_LTO_BUILD Off)
2222
endif()
2323

24+
if(NOT LLVM_ENABLE_HTTPLIB)
25+
set(LLVM_TOOL_LLVM_DEBUGINFOD_BUILD Off)
26+
endif()
27+
2428
if (LLVM_TOOL_LLVM_DRIVER_BUILD)
2529
add_llvm_tool(llvm-driver)
2630
endif()

0 commit comments

Comments
 (0)