diff --git a/.github/workflows/Ubuntu.yml b/.github/workflows/Ubuntu.yml index ce852593f..b3b8fc46a 100644 --- a/.github/workflows/Ubuntu.yml +++ b/.github/workflows/Ubuntu.yml @@ -94,6 +94,42 @@ jobs: cling-version: '1.0' llvm_enable_projects: "clang" llvm_targets_to_build: "host;NVPTX" + - name: ubu24-arm-gcc12-clang-repl-19 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '19' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" + - name: ubu24-arm-gcc12-clang-repl-18 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '18' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" + - name: ubu24-arm-gcc12-clang-repl-17 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '17' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" + - name: ubu24-arm-gcc12-clang-repl-16 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '16' + cling: Off + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" + - name: ubu24-arm-gcc9-clang13-cling + os: ubuntu-24.04-arm + compiler: gcc-9 + clang-runtime: '13' + cling: On + cling-version: '1.0' + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" steps: - uses: actions/checkout@v4 @@ -337,6 +373,33 @@ jobs: clang-runtime: '13' cling: On cling-version: '1.0' + - name: ubu24-arm-gcc12-clang-repl-19 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '19' + cling: Off + - name: ubu24-arm-gcc12-clang-repl-18 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '18' + cling: Off + - name: ubu24-arm-gcc12-clang-repl-17 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '17' + cling: Off + - name: ubu24-arm-gcc12-clang-repl-16 + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '16' + cling: Off + cppyy: Off + - name: ubu24-arm-gcc9-clang13-cling + os: ubuntu-24.04-arm + compiler: gcc-9 + clang-runtime: '13' + cling: On + cling-version: '1.0' steps: - uses: actions/checkout@v4 @@ -403,7 +466,12 @@ jobs: sudo apt-get update sudo apt-get install git g++ debhelper devscripts gnupg python3 doxygen graphviz python3-sphinx sudo apt-get install -y libc6-dbg - sudo snap install valgrind --classic + export ARCHITECHURE=$(uname -m) + if [[ "$ARCHITECHURE" != "x86_64" ]]; then + sudo apt-get install valgrind + else + sudo snap install valgrind --classic + fi sudo apt autoremove sudo apt clean # Install libraries used by the cppyy test suite diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 1fcdd6090..dceefc0c3 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -37,6 +37,14 @@ jobs: llvm_enable_projects: "clang;lld" llvm_targets_to_build: "WebAssembly" emsdk_ver: "3.1.45" + - name: ubu24-arm-gcc12-clang-repl-19-emscripten + os: ubuntu-24.04-arm + compiler: gcc-12 + clang-runtime: '19' + cling: Off + llvm_enable_projects: "clang;lld" + llvm_targets_to_build: "WebAssembly" + emsdk_ver: "3.1.45" - name: osx15-arm-clang-clang-repl-19-emscripten os: macos-15 compiler: clang diff --git a/lib/Interpreter/CppInterOp.cpp b/lib/Interpreter/CppInterOp.cpp old mode 100644 new mode 100755 index 34908d88a..15a177281 --- a/lib/Interpreter/CppInterOp.cpp +++ b/lib/Interpreter/CppInterOp.cpp @@ -2828,7 +2828,10 @@ namespace Cpp { #define DEBUG_TYPE "exec" std::array buffer; - std::unique_ptr pipe(popen(cmd, "r"), pclose); + struct file_deleter { + void operator()(FILE* fp) { pclose(fp); } + }; + std::unique_ptr pipe{popen(cmd, "r")}; LLVM_DEBUG(dbgs() << "Executing command '" << cmd << "'\n"); if (!pipe) { @@ -3437,26 +3440,27 @@ namespace Cpp { } class StreamCaptureInfo { - std::unique_ptr m_TempFile; + struct file_deleter { + void operator()(FILE* fp) { pclose(fp); } + }; + std::unique_ptr m_TempFile; int m_FD = -1; int m_DupFD = -1; public: #ifdef _MSC_VER StreamCaptureInfo(int FD) - : m_TempFile( - []() { - FILE* stream = nullptr; - errno_t err; - err = tmpfile_s(&stream); - if (err) - printf("Cannot create temporary file!\n"); - return stream; - }(), - std::fclose), + : m_TempFile{[]() { + FILE* stream = nullptr; + errno_t err; + err = tmpfile_s(&stream); + if (err) + printf("Cannot create temporary file!\n"); + return stream; + }()}, m_FD(FD) { #else - StreamCaptureInfo(int FD) : m_TempFile(tmpfile(), std::fclose), m_FD(FD) { + StreamCaptureInfo(int FD) : m_TempFile{tmpfile()}, m_FD(FD) { #endif if (!m_TempFile) { perror("StreamCaptureInfo: Unable to create temp file");