From 8d4f329ec3a94f4c74c9642f1cbf696a72323748 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 4 Feb 2026 09:45:37 +0100 Subject: [PATCH] [interop] Avoid usage of It requires linking libstdc++fs for older versions of the standard library, and the same function is provided by LLVM. --- interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt | 4 ---- interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt index abdb6d3f9a026..0383055cd2481 100644 --- a/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt +++ b/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt @@ -54,10 +54,6 @@ if(NOT WIN32 AND NOT EMSCRIPTEN) list(APPEND link_libs dl) endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) - list(APPEND link_libs stdc++fs) -endif() - # Get rid of libLLVM-X.so which is appended to the list of static libraries. if (LLVM_LINK_LLVM_DYLIB) set(new_libs ${link_libs}) diff --git a/interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp b/interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp index 8c247b1736179..60aafd436ec65 100755 --- a/interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp +++ b/interpreter/CppInterOp/lib/CppInterOp/CppInterOp.cpp @@ -74,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -3338,8 +3337,7 @@ TInterp_t CreateInterpreter(const std::vector& Args /*={}*/, std::string MainExecutableName = sys::fs::getMainExecutable(nullptr, nullptr); std::string ResourceDir = MakeResourcesPath(); llvm::Triple T(llvm::sys::getProcessTriple()); - namespace fs = std::filesystem; - if ((!fs::is_directory(ResourceDir)) && (T.isOSDarwin() || T.isOSLinux())) + if ((!sys::fs::is_directory(ResourceDir)) && (T.isOSDarwin() || T.isOSLinux())) ResourceDir = DetectResourceDir(); std::vector ClingArgv = {"-resource-dir", ResourceDir.c_str(),