Skip to content

Commit 789f30c

Browse files
[llvm] Move libSupportHTTP to top-level libHTTP (NFC) (llvm#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.
1 parent 738ead2 commit 789f30c

35 files changed

+75
-90
lines changed

lldb/source/Plugins/SymbolLocator/Debuginfod/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ add_lldb_library(lldbPluginSymbolLocatorDebuginfod PLUGIN
1818
lldbHost
1919
lldbSymbol
2020
LLVMDebuginfod
21-
22-
LINK_COMPONENTS
23-
SupportHTTP
21+
LLVMHTTP
2422
)
2523

2624
add_dependencies(lldbPluginSymbolLocatorDebuginfod

lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "lldb/Utility/Log.h"
1616

1717
#include "llvm/Debuginfod/Debuginfod.h"
18-
#include "llvm/Support/HTTP/HTTPClient.h"
18+
#include "llvm/HTTP/HTTPClient.h"
1919

2020
using namespace lldb;
2121
using namespace lldb_private;

lldb/source/Plugins/SymbolLocator/SymStore/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ add_lldb_library(lldbPluginSymbolLocatorSymStore PLUGIN
1313
lldbCore
1414
lldbHost
1515
lldbSymbol
16-
17-
LINK_COMPONENTS
18-
SupportHTTP
16+
LLVMHTTP
1917
)
2018

2119
add_dependencies(lldbPluginSymbolLocatorSymStore

lldb/source/Plugins/SymbolLocator/SymStore/SymbolLocatorSymStore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
#include "lldb/Utility/UUID.h"
1919

2020
#include "llvm/ADT/StringExtras.h"
21+
#include "llvm/HTTP/HTTPClient.h"
22+
#include "llvm/HTTP/StreamedHTTPResponseHandler.h"
2123
#include "llvm/Support/Caching.h"
2224
#include "llvm/Support/Endian.h"
2325
#include "llvm/Support/FileSystem.h"
2426
#include "llvm/Support/FormatVariadic.h"
25-
#include "llvm/Support/HTTP/HTTPClient.h"
26-
#include "llvm/Support/HTTP/StreamedHTTPResponseHandler.h"
2727
#include "llvm/Support/Path.h"
2828
#include "llvm/Support/raw_ostream.h"
2929

llvm/include/llvm/Debuginfod/Debuginfod.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
#include "llvm/ADT/StringMap.h"
2424
#include "llvm/ADT/StringRef.h"
25+
#include "llvm/HTTP/HTTPServer.h"
2526
#include "llvm/Object/BuildID.h"
2627
#include "llvm/Support/Error.h"
27-
#include "llvm/Support/HTTP/HTTPServer.h"
2828
#include "llvm/Support/MemoryBuffer.h"
2929
#include "llvm/Support/Mutex.h"
3030
#include "llvm/Support/RWMutex.h"

llvm/include/llvm/Support/HTTP/HTTPClient.h renamed to llvm/include/llvm/HTTP/HTTPClient.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
///
1313
//===----------------------------------------------------------------------===//
1414

15-
#ifndef LLVM_SUPPORT_HTTP_HTTPCLIENT_H
16-
#define LLVM_SUPPORT_HTTP_HTTPCLIENT_H
15+
#ifndef LLVM_HTTP_HTTPCLIENT_H
16+
#define LLVM_HTTP_HTTPCLIENT_H
1717

1818
#include "llvm/ADT/SmallString.h"
1919
#include "llvm/ADT/SmallVector.h"
@@ -85,4 +85,4 @@ class HTTPClient {
8585

8686
} // end namespace llvm
8787

88-
#endif // LLVM_SUPPORT_HTTP_HTTPCLIENT_H
88+
#endif // LLVM_HTTP_HTTPCLIENT_H

llvm/include/llvm/Support/HTTP/HTTPServer.h renamed to llvm/include/llvm/HTTP/HTTPServer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
///
1414
//===----------------------------------------------------------------------===//
1515

16-
#ifndef LLVM_SUPPORT_HTTP_HTTPSERVER_H
17-
#define LLVM_SUPPORT_HTTP_HTTPSERVER_H
16+
#ifndef LLVM_HTTP_HTTPSERVER_H
17+
#define LLVM_HTTP_HTTPSERVER_H
1818

1919
#include "llvm/ADT/StringRef.h"
2020
#include "llvm/Support/Error.h"
@@ -130,4 +130,4 @@ class HTTPServer {
130130
};
131131
} // end namespace llvm
132132

133-
#endif // LLVM_SUPPORT_HTTP_HTTPSERVER_H
133+
#endif // LLVM_HTTP_HTTPSERVER_H

llvm/include/llvm/Support/HTTP/StreamedHTTPResponseHandler.h renamed to llvm/include/llvm/HTTP/StreamedHTTPResponseHandler.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
///
1212
//===----------------------------------------------------------------------===//
1313

14-
#ifndef LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
15-
#define LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
14+
#ifndef LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
15+
#define LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
1616

17+
#include "llvm/HTTP/HTTPClient.h"
1718
#include "llvm/Support/Caching.h"
1819
#include "llvm/Support/Error.h"
19-
#include "llvm/Support/HTTP/HTTPClient.h"
2020
#include <functional>
2121
#include <memory>
2222

@@ -46,4 +46,4 @@ class StreamedHTTPResponseHandler : public HTTPResponseHandler {
4646

4747
} // end namespace llvm
4848

49-
#endif // LLVM_SUPPORT_HTTP_STREAMEDHTTPRESPONSEHANDLER_H
49+
#endif // LLVM_HTTP_STREAMEDHTTPRESPONSEHANDLER_H

llvm/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ add_subdirectory(Object)
3232
add_subdirectory(ObjectYAML)
3333
add_subdirectory(Option)
3434
add_subdirectory(Remarks)
35+
add_subdirectory(HTTP)
3536
add_subdirectory(Debuginfod)
3637
add_subdirectory(DebugInfo)
3738
add_subdirectory(DWARFCFIChecker)

llvm/lib/Debuginfod/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ add_llvm_library(LLVMDebuginfod
1414

1515
LINK_LIBS
1616
${imported_libs}
17+
LLVMHTTP
1718

1819
LINK_COMPONENTS
1920
Support
20-
SupportHTTP
2121
Symbolize
2222
DebugInfoDWARF
2323
BinaryFormat

0 commit comments

Comments
 (0)