[clang] [Clang-Repl] Add Lambda Support, PID Retrieval, and Dynamic liborc_rt Path in Clang-Repl (PR #155140)
    Vassil Vassilev via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Aug 25 08:08:51 PDT 2025
    
    
  
================
@@ -117,21 +128,11 @@ static llvm::Error sanitizeOopArguments(const char *ArgV0) {
   // Out-of-process executors require the ORC runtime.
   if (OrcRuntimePath.empty() && (OOPExecutor.getNumOccurrences() ||
                                  OOPExecutorConnect.getNumOccurrences())) {
-    llvm::SmallString<256> BasePath(llvm::sys::fs::getMainExecutable(
-        ArgV0, reinterpret_cast<void *>(&sanitizeOopArguments)));
-    llvm::sys::path::remove_filename(BasePath); // Remove clang-repl filename.
-    llvm::sys::path::remove_filename(BasePath); // Remove ./bin directory.
-    llvm::sys::path::append(BasePath, CLANG_INSTALL_LIBDIR_BASENAME, "clang",
-                            CLANG_VERSION_MAJOR_STRING);
-    if (SystemTriple.isOSBinFormatELF())
-      OrcRuntimePath =
-          BasePath.str().str() + "/lib/x86_64-unknown-linux-gnu/liborc_rt.a";
-    else if (SystemTriple.isOSBinFormatMachO())
-      OrcRuntimePath = BasePath.str().str() + "/lib/darwin/liborc_rt_osx.a";
-    else
+    if(!llvm::sys::fs::exists(_OrcRuntimePath))
----------------
vgvassilev wrote:
We should sink that diagnostics there, too.
https://github.com/llvm/llvm-project/pull/155140
    
    
More information about the cfe-commits
mailing list