[Lldb-commits] [lldb] 789f30c - [llvm] Move libSupportHTTP to top-level libHTTP (NFC) (#191202)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 15 01:38:58 PDT 2026
Author: Stefan Gränitz
Date: 2026-04-15T10:38:53+02:00
New Revision: 789f30c73ef4e6a26974a3813fda4aab21790296
URL: https://github.com/llvm/llvm-project/commit/789f30c73ef4e6a26974a3813fda4aab21790296
DIFF: https://github.com/llvm/llvm-project/commit/789f30c73ef4e6a26974a3813fda4aab21790296.diff
LOG: [llvm] Move libSupportHTTP to top-level libHTTP (NFC) (#191202)
The HTTP implementation depends on CURL and would preferably not be part
of the LLVM dylib. This was not possible as a nested library under
libSupport, because libSupport itself is part of the LLVM dylib. This
patch moves the HTTP code into a separate top-level library that is
independent from libSupport and excluded from the LLVM dylib.
Added:
llvm/include/llvm/HTTP/HTTPClient.h
llvm/include/llvm/HTTP/HTTPServer.h
llvm/include/llvm/HTTP/StreamedHTTPResponseHandler.h
llvm/lib/HTTP/CMakeLists.txt
llvm/lib/HTTP/HTTPClient.cpp
llvm/lib/HTTP/HTTPServer.cpp
llvm/lib/HTTP/StreamedHTTPResponseHandler.cpp
llvm/unittests/HTTP/CMakeLists.txt
llvm/unittests/HTTP/HTTPServerTests.cpp
Modified:
lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt
lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt
lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp
llvm/include/llvm/Debuginfod/Debuginfod.h
llvm/lib/CMakeLists.txt
llvm/lib/Debuginfod/CMakeLists.txt
llvm/lib/Debuginfod/Debuginfod.cpp
llvm/lib/Support/CMakeLists.txt
llvm/tools/llvm-cov/CMakeLists.txt
llvm/tools/llvm-cov/CodeCoverage.cpp
llvm/tools/llvm-debuginfod-find/CMakeLists.txt
llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
llvm/tools/llvm-debuginfod/CMakeLists.txt
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
llvm/tools/llvm-objdump/CMakeLists.txt
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-profdata/CMakeLists.txt
llvm/tools/llvm-profdata/llvm-profdata.cpp
llvm/tools/llvm-symbolizer/CMakeLists.txt
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
llvm/unittests/CMakeLists.txt
llvm/unittests/Debuginfod/CMakeLists.txt
llvm/unittests/Debuginfod/DebuginfodTests.cpp
llvm/unittests/Support/CMakeLists.txt
Removed:
llvm/include/llvm/Support/HTTP/HTTPClient.h
llvm/include/llvm/Support/HTTP/HTTPServer.h
llvm/include/llvm/Support/HTTP/StreamedHTTPResponseHandler.h
llvm/lib/Support/HTTP/CMakeLists.txt
llvm/lib/Support/HTTP/HTTPClient.cpp
llvm/lib/Support/HTTP/HTTPServer.cpp
llvm/lib/Support/HTTP/StreamedHTTPResponseHandler.cpp
llvm/unittests/Support/HTTP/CMakeLists.txt
llvm/unittests/Support/HTTP/HTTPServerTests.cpp
################################################################################
diff --git a/lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt b/lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt
index 81d4ab2539615..ac6b03aa78041 100644
--- a/lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt
+++ b/lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt
@@ -18,9 +18,7 @@ add_lldb_library(lldbPluginSymbolLocatorDebuginfod PLUGIN
lldbHost
lldbSymbol
LLVMDebuginfod
-
- LINK_COMPONENTS
- SupportHTTP
+ LLVMHTTP
)
add_dependencies(lldbPluginSymbolLocatorDebuginfod
diff --git a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
index e28e74ba67bfa..1ffbc349a5841 100644
--- a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
+++ b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
@@ -15,7 +15,7 @@
#include "lldb/Utility/Log.h"
#include "llvm/Debuginfod/Debuginfod.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
+#include "llvm/HTTP/HTTPClient.h"
using namespace lldb;
using namespace lldb_private;
diff --git a/lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt b/lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt
index 118b91f39cfe2..66a3d8640816f 100644
--- a/lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt
+++ b/lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt
@@ -13,9 +13,7 @@ add_lldb_library(lldbPluginSymbolLocatorSymStore PLUGIN
lldbCore
lldbHost
lldbSymbol
-
- LINK_COMPONENTS
- SupportHTTP
+ LLVMHTTP
)
add_dependencies(lldbPluginSymbolLocatorSymStore
diff --git a/lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp b/lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp
index 41b15c6725a26..1344232917b33 100644
--- a/lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp
+++ b/lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp
@@ -18,12 +18,12 @@
#include "lldb/Utility/UUID.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/HTTP/HTTPClient.h"
+#include "llvm/HTTP/StreamedHTTPResponseHandler.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
-#include "llvm/Support/HTTP/StreamedHTTPResponseHandler.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/include/llvm/Debuginfod/Debuginfod.h b/llvm/include/llvm/Debuginfod/Debuginfod.h
index 0bdb5d3ce3882..005e5c7d3a83f 100644
--- a/llvm/include/llvm/Debuginfod/Debuginfod.h
+++ b/llvm/include/llvm/Debuginfod/Debuginfod.h
@@ -22,9 +22,9 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/HTTP/HTTPServer.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/HTTP/HTTPServer.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/RWMutex.h"
diff --git a/llvm/include/llvm/Support/HTTP/HTTPClient.h b/llvm/include/llvm/HTTP/HTTPClient.h
similarity index 95%
rename from llvm/include/llvm/Support/HTTP/HTTPClient.h
rename to llvm/include/llvm/HTTP/HTTPClient.h
index 17b706ff3e083..a2ba4251d35ce 100644
--- a/llvm/include/llvm/Support/HTTP/HTTPClient.h
+++ b/llvm/include/llvm/HTTP/HTTPClient.h
@@ -12,8 +12,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_HTTP_HTTPCLIENT_H
-#define LLVM_SUPPORT_HTTP_HTTPCLIENT_H
+#ifndef LLVM_HTTP_HTTPCLIENT_H
+#define LLVM_HTTP_HTTPCLIENT_H
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
@@ -85,4 +85,4 @@ class HTTPClient {
} // end namespace llvm
-#endif // LLVM_SUPPORT_HTTP_HTTPCLIENT_H
+#endif // LLVM_HTTP_HTTPCLIENT_H
diff --git a/llvm/include/llvm/Support/HTTP/HTTPServer.h b/llvm/include/llvm/HTTP/HTTPServer.h
similarity index 97%
rename from llvm/include/llvm/Support/HTTP/HTTPServer.h
rename to llvm/include/llvm/HTTP/HTTPServer.h
index 101ca0e6fbd6b..1d218002789c3 100644
--- a/llvm/include/llvm/Support/HTTP/HTTPServer.h
+++ b/llvm/include/llvm/HTTP/HTTPServer.h
@@ -13,8 +13,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_HTTP_HTTPSERVER_H
-#define LLVM_SUPPORT_HTTP_HTTPSERVER_H
+#ifndef LLVM_HTTP_HTTPSERVER_H
+#define LLVM_HTTP_HTTPSERVER_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
@@ -130,4 +130,4 @@ class HTTPServer {
};
} // end namespace llvm
-#endif // LLVM_SUPPORT_HTTP_HTTPSERVER_H
+#endif // LLVM_HTTP_HTTPSERVER_H
diff --git a/llvm/include/llvm/Support/HTTP/StreamedHTTPResponseHandler.h b/llvm/include/llvm/HTTP/StreamedHTTPResponseHandler.h
similarity index 87%
rename from llvm/include/llvm/Support/HTTP/StreamedHTTPResponseHandler.h
rename to llvm/include/llvm/HTTP/StreamedHTTPResponseHandler.h
index 14ffab8aa1be3..ce9bf28655186 100644
--- a/llvm/include/llvm/Support/HTTP/StreamedHTTPResponseHandler.h
+++ b/llvm/include/llvm/HTTP/StreamedHTTPResponseHandler.h
@@ -11,12 +11,12 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
-#define LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
+#ifndef LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
+#define LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include <functional>
#include <memory>
@@ -46,4 +46,4 @@ class StreamedHTTPResponseHandler : public HTTPResponseHandler {
} // end namespace llvm
-#endif // LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
+#endif // LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index f0faaff307997..3166d39cd5af5 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -32,6 +32,7 @@ add_subdirectory(Object)
add_subdirectory(ObjectYAML)
add_subdirectory(Option)
add_subdirectory(Remarks)
+add_subdirectory(HTTP)
add_subdirectory(Debuginfod)
add_subdirectory(DebugInfo)
add_subdirectory(DWARFCFIChecker)
diff --git a/llvm/lib/Debuginfod/CMakeLists.txt b/llvm/lib/Debuginfod/CMakeLists.txt
index c31481cc97f08..5b3403b961a4c 100644
--- a/llvm/lib/Debuginfod/CMakeLists.txt
+++ b/llvm/lib/Debuginfod/CMakeLists.txt
@@ -14,10 +14,10 @@ add_llvm_library(LLVMDebuginfod
LINK_LIBS
${imported_libs}
+ LLVMHTTP
LINK_COMPONENTS
Support
- SupportHTTP
Symbolize
DebugInfoDWARF
BinaryFormat
diff --git a/llvm/lib/Debuginfod/Debuginfod.cpp b/llvm/lib/Debuginfod/Debuginfod.cpp
index 77de51d90a4eb..84fe7ac06336a 100644
--- a/llvm/lib/Debuginfod/Debuginfod.cpp
+++ b/llvm/lib/Debuginfod/Debuginfod.cpp
@@ -27,6 +27,8 @@
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
+#include "llvm/HTTP/HTTPClient.h"
+#include "llvm/HTTP/StreamedHTTPResponseHandler.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/CachePruning.h"
@@ -34,8 +36,6 @@
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileUtilities.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
-#include "llvm/Support/HTTP/StreamedHTTPResponseHandler.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ThreadPool.h"
diff --git a/llvm/lib/Support/HTTP/CMakeLists.txt b/llvm/lib/HTTP/CMakeLists.txt
similarity index 80%
rename from llvm/lib/Support/HTTP/CMakeLists.txt
rename to llvm/lib/HTTP/CMakeLists.txt
index f8e4b87539931..e3b71434333a1 100644
--- a/llvm/lib/Support/HTTP/CMakeLists.txt
+++ b/llvm/lib/HTTP/CMakeLists.txt
@@ -1,26 +1,27 @@
-# Link LibCURL if the user wants it
-if (LLVM_ENABLE_CURL)
- set(imported_libs CURL::libcurl)
-endif()
-
-# Link cpp-httplib if the user wants it
-if (LLVM_ENABLE_HTTPLIB)
- set(imported_libs ${imported_libs} httplib::httplib)
-endif()
-
-# Use WinHTTP on Windows
-if (WIN32)
- set(imported_libs ${imported_libs} winhttp.lib)
-endif()
-
-add_llvm_component_library(LLVMSupportHTTP
- HTTPClient.cpp
- HTTPServer.cpp
- StreamedHTTPResponseHandler.cpp
-
- LINK_LIBS
- ${imported_libs}
-
- LINK_COMPONENTS
- Support
-)
+# Link LibCURL if the user wants it
+if (LLVM_ENABLE_CURL)
+ set(imported_libs CURL::libcurl)
+endif()
+
+# Link cpp-httplib if the user wants it
+if (LLVM_ENABLE_HTTPLIB)
+ set(imported_libs ${imported_libs} httplib::httplib)
+endif()
+
+# Use WinHTTP on Windows
+if (WIN32)
+ set(imported_libs ${imported_libs} winhttp.lib)
+endif()
+
+# This is no component library so the LLVM dylib does not gain a dependency on curl
+add_llvm_library(LLVMHTTP
+ HTTPClient.cpp
+ HTTPServer.cpp
+ StreamedHTTPResponseHandler.cpp
+
+ LINK_LIBS
+ ${imported_libs}
+
+ LINK_COMPONENTS
+ Support
+)
diff --git a/llvm/lib/Support/HTTP/HTTPClient.cpp b/llvm/lib/HTTP/HTTPClient.cpp
similarity index 99%
rename from llvm/lib/Support/HTTP/HTTPClient.cpp
rename to llvm/lib/HTTP/HTTPClient.cpp
index e5ff6e6bcacd3..8517c8cc7c7a0 100644
--- a/llvm/lib/Support/HTTP/HTTPClient.cpp
+++ b/llvm/lib/HTTP/HTTPClient.cpp
@@ -12,7 +12,7 @@
///
//===----------------------------------------------------------------------===//
-#include "llvm/Support/HTTP/HTTPClient.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/StringRef.h"
diff --git a/llvm/lib/Support/HTTP/HTTPServer.cpp b/llvm/lib/HTTP/HTTPServer.cpp
similarity index 99%
rename from llvm/lib/Support/HTTP/HTTPServer.cpp
rename to llvm/lib/HTTP/HTTPServer.cpp
index c6fd49f7ee623..219b2d0ab9ae1 100644
--- a/llvm/lib/Support/HTTP/HTTPServer.cpp
+++ b/llvm/lib/HTTP/HTTPServer.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "llvm/Support/HTTP/HTTPServer.h"
+#include "llvm/HTTP/HTTPServer.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
diff --git a/llvm/lib/Support/HTTP/StreamedHTTPResponseHandler.cpp b/llvm/lib/HTTP/StreamedHTTPResponseHandler.cpp
similarity index 94%
rename from llvm/lib/Support/HTTP/StreamedHTTPResponseHandler.cpp
rename to llvm/lib/HTTP/StreamedHTTPResponseHandler.cpp
index 5a0e0e6355684..2ebe418cde089 100644
--- a/llvm/lib/Support/HTTP/StreamedHTTPResponseHandler.cpp
+++ b/llvm/lib/HTTP/StreamedHTTPResponseHandler.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Support/HTTP/StreamedHTTPResponseHandler.h"
+#include "llvm/HTTP/StreamedHTTPResponseHandler.h"
namespace llvm {
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index a2c68233fd253..e8d505f218b69 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -138,7 +138,6 @@ if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
endif()
add_subdirectory(BLAKE3)
-add_subdirectory(HTTP)
add_llvm_component_library(LLVMSupport
ABIBreak.cpp
diff --git a/llvm/tools/llvm-cov/CMakeLists.txt b/llvm/tools/llvm-cov/CMakeLists.txt
index f902469689ccd..6602a2319cb57 100644
--- a/llvm/tools/llvm-cov/CMakeLists.txt
+++ b/llvm/tools/llvm-cov/CMakeLists.txt
@@ -1,7 +1,6 @@
set(LLVM_LINK_COMPONENTS
Core
Support
- SupportHTTP
Object
Coverage
ProfileData
@@ -23,4 +22,4 @@ add_llvm_tool(llvm-cov
TestingSupport.cpp
)
-target_link_libraries(llvm-cov PRIVATE LLVMDebuginfod)
+target_link_libraries(llvm-cov PRIVATE LLVMHTTP LLVMDebuginfod)
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 1196faa1acef9..e19101ac76045 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -24,13 +24,13 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Object/BuildID.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
diff --git a/llvm/tools/llvm-debuginfod-find/CMakeLists.txt b/llvm/tools/llvm-debuginfod-find/CMakeLists.txt
index e23357008fe77..fcc706d6df452 100644
--- a/llvm/tools/llvm-debuginfod-find/CMakeLists.txt
+++ b/llvm/tools/llvm-debuginfod-find/CMakeLists.txt
@@ -2,7 +2,6 @@ set(LLVM_LINK_COMPONENTS
Option
Object
Support
- SupportHTTP
)
set(LLVM_TARGET_DEFINITIONS Opts.td)
tablegen(LLVM Opts.inc -gen-opt-parser-defs)
@@ -14,8 +13,9 @@ add_llvm_tool(llvm-debuginfod-find
DebugInfodFindOptsTableGen
GENERATE_DRIVER
)
+
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
- target_link_libraries(llvm-debuginfod-find PRIVATE LLVMDebuginfod)
+ target_link_libraries(llvm-debuginfod-find PRIVATE LLVMDebuginfod LLVMHTTP)
endif()
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
add_llvm_tool_symlink(debuginfod-find llvm-debuginfod-find)
diff --git a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
index 8f1b9d0f4659d..b6a5efd3e162c 100644
--- a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
+++ b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
@@ -19,10 +19,10 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LLVMDriver.h"
diff --git a/llvm/tools/llvm-debuginfod/CMakeLists.txt b/llvm/tools/llvm-debuginfod/CMakeLists.txt
index 1bca529dcd25e..194784b7a7eee 100644
--- a/llvm/tools/llvm-debuginfod/CMakeLists.txt
+++ b/llvm/tools/llvm-debuginfod/CMakeLists.txt
@@ -1,7 +1,6 @@
set(LLVM_LINK_COMPONENTS
Option
Support
- SupportHTTP
)
set(LLVM_TARGET_DEFINITIONS Opts.td)
tablegen(LLVM Opts.inc -gen-opt-parser-defs)
@@ -16,7 +15,7 @@ add_llvm_tool(llvm-debuginfod
)
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
- target_link_libraries(llvm-debuginfod PRIVATE LLVMDebuginfod)
+ target_link_libraries(llvm-debuginfod PRIVATE LLVMDebuginfod LLVMHTTP)
endif()
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
diff --git a/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp b/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
index 16d95532a9edc..29b320ca5c5b9 100644
--- a/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
+++ b/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
@@ -18,10 +18,10 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/ThreadPool.h"
diff --git a/llvm/tools/llvm-objdump/CMakeLists.txt b/llvm/tools/llvm-objdump/CMakeLists.txt
index 8283f07da36ea..d2d0e6ae91836 100644
--- a/llvm/tools/llvm-objdump/CMakeLists.txt
+++ b/llvm/tools/llvm-objdump/CMakeLists.txt
@@ -12,7 +12,6 @@ set(LLVM_LINK_COMPONENTS
Object
Option
Support
- SupportHTTP
Symbolize
TargetParser
)
@@ -42,7 +41,7 @@ add_llvm_tool(llvm-objdump
)
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
- target_link_libraries(llvm-objdump PRIVATE LLVMDebuginfod)
+ target_link_libraries(llvm-objdump PRIVATE LLVMDebuginfod LLVMHTTP)
endif()
add_llvm_tool_symlink(llvm-otool llvm-objdump)
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 776e9c6e2f89f..0b248c4710e40 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -35,6 +35,7 @@
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
#include "llvm/Demangle/Demangle.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
@@ -65,7 +66,6 @@
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
diff --git a/llvm/tools/llvm-profdata/CMakeLists.txt b/llvm/tools/llvm-profdata/CMakeLists.txt
index eeaaa1731744d..be3daadf38716 100644
--- a/llvm/tools/llvm-profdata/CMakeLists.txt
+++ b/llvm/tools/llvm-profdata/CMakeLists.txt
@@ -3,7 +3,6 @@ set(LLVM_LINK_COMPONENTS
Object
ProfileData
Support
- SupportHTTP
)
add_llvm_tool(llvm-profdata
@@ -13,4 +12,4 @@ add_llvm_tool(llvm-profdata
intrinsics_gen
)
-target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)
+target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod LLVMHTTP)
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index ab67d75770fee..6bf3179696e4a 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -14,6 +14,7 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Object/Binary.h"
#include "llvm/ProfileData/DataAccessProf.h"
@@ -34,7 +35,6 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormattedStream.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/llvm/tools/llvm-symbolizer/CMakeLists.txt b/llvm/tools/llvm-symbolizer/CMakeLists.txt
index 39937e08b7884..15ef8337f63c4 100644
--- a/llvm/tools/llvm-symbolizer/CMakeLists.txt
+++ b/llvm/tools/llvm-symbolizer/CMakeLists.txt
@@ -12,7 +12,6 @@ set(LLVM_LINK_COMPONENTS
Object
Option
Support
- SupportHTTP
Symbolize
)
@@ -25,7 +24,7 @@ add_llvm_tool(llvm-symbolizer
)
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
- target_link_libraries(llvm-symbolizer PRIVATE LLVMDebuginfod)
+ target_link_libraries(llvm-symbolizer PRIVATE LLVMDebuginfod LLVMHTTP)
endif()
add_llvm_tool_symlink(llvm-addr2line llvm-symbolizer)
diff --git a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
index 27378a7c0aa8c..4a75e14c6dd7a 100644
--- a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -25,6 +25,7 @@
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
@@ -33,7 +34,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/StringSaver.h"
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index d22613d12d6dc..d2932520bbb80 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -45,6 +45,7 @@ add_subdirectory(ExecutionEngine)
add_subdirectory(FileCheck)
add_subdirectory(Frontend)
add_subdirectory(FuzzMutate)
+add_subdirectory(HTTP)
add_subdirectory(InterfaceStub)
add_subdirectory(IR)
add_subdirectory(LineEditor)
diff --git a/llvm/unittests/Debuginfod/CMakeLists.txt b/llvm/unittests/Debuginfod/CMakeLists.txt
index c8b8e24fc34e0..cb800872e10e8 100644
--- a/llvm/unittests/Debuginfod/CMakeLists.txt
+++ b/llvm/unittests/Debuginfod/CMakeLists.txt
@@ -1,7 +1,3 @@
-set(LLVM_LINK_COMPONENTS
- SupportHTTP
- )
-
add_llvm_unittest(DebuginfodTests
DebuginfodTests.cpp
)
diff --git a/llvm/unittests/Debuginfod/DebuginfodTests.cpp b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
index 2e39484e7559f..00d3017638f38 100644
--- a/llvm/unittests/Debuginfod/DebuginfodTests.cpp
+++ b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/HTTP/HTTPClient.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/Path.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
diff --git a/llvm/unittests/HTTP/CMakeLists.txt b/llvm/unittests/HTTP/CMakeLists.txt
new file mode 100644
index 0000000000000..411a7280998b9
--- /dev/null
+++ b/llvm/unittests/HTTP/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_llvm_unittest(HTTPTests
+ HTTPServerTests.cpp
+ )
+
+target_link_libraries(HTTPTests PRIVATE
+ LLVMHTTP
+ LLVMTestingSupport
+ )
diff --git a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp b/llvm/unittests/HTTP/HTTPServerTests.cpp
similarity index 99%
rename from llvm/unittests/Support/HTTP/HTTPServerTests.cpp
rename to llvm/unittests/HTTP/HTTPServerTests.cpp
index 1066fdd2f7735..cc48434149437 100644
--- a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp
+++ b/llvm/unittests/HTTP/HTTPServerTests.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/StringExtras.h"
+#include "llvm/HTTP/HTTPClient.h"
+#include "llvm/HTTP/HTTPServer.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
-#include "llvm/Support/HTTP/HTTPServer.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
diff --git a/llvm/unittests/Support/CMakeLists.txt b/llvm/unittests/Support/CMakeLists.txt
index a291f17331ff3..a8bf96bbe096f 100644
--- a/llvm/unittests/Support/CMakeLists.txt
+++ b/llvm/unittests/Support/CMakeLists.txt
@@ -128,7 +128,6 @@ add_llvm_unittest(SupportTests
intrinsics_gen
)
-add_subdirectory(HTTP)
add_subdirectory(LSP)
target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)
diff --git a/llvm/unittests/Support/HTTP/CMakeLists.txt b/llvm/unittests/Support/HTTP/CMakeLists.txt
deleted file mode 100644
index a6a1e72dcf7dc..0000000000000
--- a/llvm/unittests/Support/HTTP/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- SupportHTTP
- )
-
-add_llvm_unittest(SupportHTTPTests
- HTTPServerTests.cpp
- )
-
-target_link_libraries(SupportHTTPTests PRIVATE
- LLVMTestingSupport
- )
More information about the lldb-commits
mailing list