[llvm] [orc-rt] remove socket support per platform from ogre (PR #226855)
Jared Wyles via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 20:47:17 PDT 2026
https://github.com/jaredwy updated https://github.com/llvm/llvm-project/pull/226855
>From c4f2b01f05706a4b57d38012352974286029376b Mon Sep 17 00:00:00 2001
From: Jared Wyles <jared.wyles at gmail.com>
Date: Mon, 28 Sep 2026 10:19:35 +1000
Subject: [PATCH 1/2] [orc-rt] remove socket support per platform from ogre
---
orc-rt/tools/ogre/CMakeLists.txt | 4 ++++
orc-rt/tools/ogre/ogre.cpp | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/orc-rt/tools/ogre/CMakeLists.txt b/orc-rt/tools/ogre/CMakeLists.txt
index a448a7f1b76bf..373fd4aae65a6 100644
--- a/orc-rt/tools/ogre/CMakeLists.txt
+++ b/orc-rt/tools/ogre/CMakeLists.txt
@@ -1,5 +1,9 @@
add_executable(ogre ogre.cpp)
target_compile_options(ogre PRIVATE ${ORC_RT_COMPILE_FLAGS})
+if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(ogre PRIVATE ORC_RT_HAS_SOCKET_CONNECTOR)
+endif()
+
# ogre uses the C++ API, which orc-rt-bedrock does not export when built as a
# shared library, so link the objects rather than the shipped library.
target_link_libraries(ogre
diff --git a/orc-rt/tools/ogre/ogre.cpp b/orc-rt/tools/ogre/ogre.cpp
index 398622275066a..b72912e3868ed 100644
--- a/orc-rt/tools/ogre/ogre.cpp
+++ b/orc-rt/tools/ogre/ogre.cpp
@@ -17,7 +17,9 @@
#include "orc-rt/bedrock/NativeDylibManager.h"
#include "orc-rt/bedrock/Session.h"
#include "orc-rt/bedrock/SimpleNativeMemoryMap.h"
+#ifdef ORC_RT_HAS_SOCKET_CONNECTOR
#include "orc-rt/bedrock/SocketConnector.h"
+#endif
#include "orc-rt/bedrock/ThreadPoolRunner.h"
#include "orc-rt/bedrock/sps/AllSPSCI.h"
@@ -106,9 +108,10 @@ Error setupSession(Session &S, const Options &Opts,
Error trySetupAndConnect(Session &S, const Options &Opts) noexcept {
ConnectorRegistry ConnRegistry;
- if (auto Err = registerSocketConnector(ConnRegistry))
- return Err;
- // registerTCPConnect(ConnRegistry);
+ #ifdef ORC_RT_HAS_SOCKET_CONNECTOR
+ if (auto Err = registerSocketConnector(Connectors))
+ return Err;
+ #endif
auto BI = BootstrapInfo::CreateDefault(S);
if (!BI)
>From ad65ca89ecc695f76139ebdae547b1777d565ba1 Mon Sep 17 00:00:00 2001
From: Jared Wyles <jared.wyles at gmail.com>
Date: Mon, 28 Sep 2026 13:35:35 +1000
Subject: [PATCH 2/2] [orc-rt] Stubbing the symbol instead of turning it off
---
.../bedrock/sys/windows/SocketConnector.cpp | 29 +++++++++++++++++++
orc-rt/tools/ogre/ogre.cpp | 8 ++---
2 files changed, 31 insertions(+), 6 deletions(-)
create mode 100644 orc-rt/lib/bedrock/sys/windows/SocketConnector.cpp
diff --git a/orc-rt/lib/bedrock/sys/windows/SocketConnector.cpp b/orc-rt/lib/bedrock/sys/windows/SocketConnector.cpp
new file mode 100644
index 0000000000000..31362b79c11ff
--- /dev/null
+++ b/orc-rt/lib/bedrock/sys/windows/SocketConnector.cpp
@@ -0,0 +1,29 @@
+//===- SocketConnector.cpp - Socket connector on Windows --------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "orc-rt/bedrock/SocketConnector.h"
+
+using namespace orc_rt;
+
+namespace {
+
+Error socketConnectorNotImplemented(const ConnectionSpec &, Session &,
+ BootstrapInfo) noexcept {
+ return make_error<StringError>(
+ "Socket transport is not implemented on Windows");
+}
+
+} // namespace
+
+namespace orc_rt {
+
+Error registerSocketConnector(ConnectorRegistry &R) noexcept {
+ return R.registerConnector("socket", socketConnectorNotImplemented);
+}
+
+} // namespace orc_rt
diff --git a/orc-rt/tools/ogre/ogre.cpp b/orc-rt/tools/ogre/ogre.cpp
index b72912e3868ed..00a8b58f630b8 100644
--- a/orc-rt/tools/ogre/ogre.cpp
+++ b/orc-rt/tools/ogre/ogre.cpp
@@ -17,9 +17,7 @@
#include "orc-rt/bedrock/NativeDylibManager.h"
#include "orc-rt/bedrock/Session.h"
#include "orc-rt/bedrock/SimpleNativeMemoryMap.h"
-#ifdef ORC_RT_HAS_SOCKET_CONNECTOR
#include "orc-rt/bedrock/SocketConnector.h"
-#endif
#include "orc-rt/bedrock/ThreadPoolRunner.h"
#include "orc-rt/bedrock/sps/AllSPSCI.h"
@@ -108,10 +106,8 @@ Error setupSession(Session &S, const Options &Opts,
Error trySetupAndConnect(Session &S, const Options &Opts) noexcept {
ConnectorRegistry ConnRegistry;
- #ifdef ORC_RT_HAS_SOCKET_CONNECTOR
- if (auto Err = registerSocketConnector(Connectors))
- return Err;
- #endif
+ if (auto Err = registerSocketConnector(Connectors))
+ return Err;
auto BI = BootstrapInfo::CreateDefault(S);
if (!BI)
More information about the llvm-commits
mailing list