[clang] [clang-repl] Forward remote executor connection address (PR #241154)

Anutosh Bhat via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 10 22:50:01 PST 2026


https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/241154

Forward `-oop-executor-connect` through IncrementalExecutorBuilder::Options to the ORC executor builder. This restores TCP connections, which previously failed because the connection address was dropped.

>From 38d4df6cd3267eff8c7d9b99bd378cbdf57c3399 Mon Sep 17 00:00:00 2001
From: anutosh491 <andersonbhat491 at gmail.com>
Date: Wed, 11 Nov 2026 12:17:52 +0530
Subject: [PATCH] [clang-repl] Forward remote executor connection address

---
 clang/include/clang/Interpreter/IncrementalExecutor.h   | 1 +
 clang/lib/Interpreter/OrcIncrementalExecutorBuilder.cpp | 1 +
 clang/tools/clang-repl/ClangRepl.cpp                    | 1 +
 3 files changed, 3 insertions(+)

diff --git a/clang/include/clang/Interpreter/IncrementalExecutor.h b/clang/include/clang/Interpreter/IncrementalExecutor.h
index 6615355b798c1a..0140b8448b6d76 100644
--- a/clang/include/clang/Interpreter/IncrementalExecutor.h
+++ b/clang/include/clang/Interpreter/IncrementalExecutor.h
@@ -39,6 +39,7 @@ class IncrementalExecutorBuilder {
   struct Options {
     bool IsOutOfProcess = false;
     std::string ExecutorPath;
+    std::string ExecutorConnect;
     std::string RuntimePath;
     unsigned SlabAllocateSize = 0;
     bool UseSharedMemory = false;
diff --git a/clang/lib/Interpreter/OrcIncrementalExecutorBuilder.cpp b/clang/lib/Interpreter/OrcIncrementalExecutorBuilder.cpp
index 89db2d71197a0a..ac3ab5aea141d9 100644
--- a/clang/lib/Interpreter/OrcIncrementalExecutorBuilder.cpp
+++ b/clang/lib/Interpreter/OrcIncrementalExecutorBuilder.cpp
@@ -95,6 +95,7 @@ OrcIncrementalExecutorBuilder::configure(IncrementalCompilerBuilder &CB,
                                          const Options &Opts) {
   IsOutOfProcess = Opts.IsOutOfProcess;
   OOPExecutor = Opts.ExecutorPath;
+  OOPExecutorConnect = Opts.ExecutorConnect;
   OrcRuntimePath = Opts.RuntimePath;
   if (OrcRuntimePath.empty())
     CB.SetDriverCompilationCallback(UpdateOrcRuntimePathCB);
diff --git a/clang/tools/clang-repl/ClangRepl.cpp b/clang/tools/clang-repl/ClangRepl.cpp
index df0786796cb8ca..86e79ceebc1fbe 100644
--- a/clang/tools/clang-repl/ClangRepl.cpp
+++ b/clang/tools/clang-repl/ClangRepl.cpp
@@ -299,6 +299,7 @@ int main(int argc, const char **argv) {
   ExecutorOpts.IsOutOfProcess =
       !OOPExecutor.empty() || !OOPExecutorConnect.empty();
   ExecutorOpts.ExecutorPath = OOPExecutor;
+  ExecutorOpts.ExecutorConnect = OOPExecutorConnect;
   ExecutorOpts.RuntimePath = OrcRuntimePath;
   ExecutorOpts.SlabAllocateSize = *SizeOrErr;
   ExecutorOpts.UseSharedMemory = UseSharedMemory;



More information about the cfe-commits mailing list