From 9d69917509d2b7917c66d702734c98a11a200bf1 Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Sat, 30 Nov 2024 00:07:27 +0100 Subject: [PATCH] [ci] Add latest cling versions(LLVM 16, 18) --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++------------ lib/Interpreter/CMakeLists.txt | 9 ++++--- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 293bfd42b..ab891a691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,12 +53,21 @@ jobs: cppyy: On llvm_enable_projects: "clang" llvm_targets_to_build: "host;NVPTX" - - name: ubu22-x86-gcc9-clang13-cling + - name: ubu22-x86-gcc9-clang18-cling os: ubuntu-22.04 - compiler: gcc-9 - clang-runtime: '13' + compiler: gcc-12 + clang-runtime: '18' cling: On - cling-version: '1.0' + cling-version: 'refs/heads/master' + cppyy: On + llvm_enable_projects: "clang" + llvm_targets_to_build: "host;NVPTX" + - name: ubu22-x86-gcc9-clang16-cling + os: ubuntu-22.04 + compiler: gcc-12 + clang-runtime: '16' + cling: On + cling-version: 'v1.1' cppyy: On llvm_enable_projects: "clang" llvm_targets_to_build: "host;NVPTX" @@ -188,7 +197,7 @@ jobs: cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]') if [[ "$cling_on" == "ON" ]]; then - export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git refs/tags/v${{ matrix.cling-version }} | tr '\t' '-') + export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git ${{ matrix.cling-version }} | tr '\t' '-') export LLVM_HASH=$(git ls-remote https://github.com/root-project/llvm-project.git cling-llvm${{ matrix.clang-runtime}} | tr '\t' '-') else export CLING_HASH="Repl" @@ -210,7 +219,7 @@ jobs: if ( "${{ matrix.cling }}" -imatch "On" ) { - $env:CLING_HASH_TEMP = ( git ls-remote https://github.com/root-project/cling.git refs/tags/v${{ matrix.cling-version }} ) + $env:CLING_HASH_TEMP = ( git ls-remote https://github.com/root-project/cling.git ${{ matrix.cling-version }} ) $env:CLING_HASH = $env:CLING_HASH_TEMP -replace "\t","-" } else @@ -365,7 +374,7 @@ jobs: if [[ "${cling_on}" == "ON" ]]; then git clone https://github.com/root-project/cling.git cd ./cling - git checkout tags/v${{ matrix.cling-version }} + git checkout ${{ matrix.cling-version }} cd .. git clone --depth=1 -b cling-llvm${{ matrix.clang-runtime }} https://github.com/root-project/llvm-project.git else # repl @@ -392,8 +401,7 @@ jobs: ../llvm cmake --build . --target clang --parallel ${{ env.ncpus }} cmake --build . --target cling --parallel ${{ env.ncpus }} - # Now build gtest.a and gtest_main for CppInterOp to run its tests. - cmake --build . --target gtest_main --parallel ${{ env.ncpus }} + else # Apply patches llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]') @@ -432,7 +440,7 @@ jobs: { git clone https://github.com/root-project/cling.git cd ./cling - git checkout tags/v${{ matrix.cling-version }} + git checkout {{ matrix.cling-version }} cd .. git clone --depth=1 -b cling-llvm${{ matrix.clang-runtime }} https://github.com/root-project/llvm-project.git $env:PWD_DIR= $PWD.Path @@ -552,12 +560,19 @@ jobs: clang-runtime: '16' cling: Off cppyy: Off - - name: ubu22-x86-gcc9-clang13-cling-cppyy + - name: ubu22-x86-gcc9-clang18-cling os: ubuntu-22.04 - compiler: gcc-9 - clang-runtime: '13' + compiler: gcc-12 + clang-runtime: '18' cling: On - cling-version: '1.0' + cling-version: 'refs/heads/master' + cppyy: On + - name: ubu22-x86-gcc9-clang16-cling + os: ubuntu-22.04 + compiler: gcc-12 + clang-runtime: '16' + cling: On + cling-version: 'v1.1' cppyy: On #FIXME: Windows CppInterOp tests expected to fail #until https://github.com/compiler-research/CppInterOp/issues/188 is solved @@ -1179,7 +1194,7 @@ jobs: cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]') if [[ "$cling_on" == "ON" ]]; then - export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git refs/tags/v${{ matrix.cling-version }} | tr '\t' '-') + export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git ${{ matrix.cling-version }} | tr '\t' '-') export LLVM_HASH=$(git ls-remote https://github.com/root-project/llvm-project.git cling-llvm${{ matrix.clang-runtime}} | tr '\t' '-') else export CLING_HASH="Repl" diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt index 7f4ca53e1..9d14d7c8f 100644 --- a/lib/Interpreter/CMakeLists.txt +++ b/lib/Interpreter/CMakeLists.txt @@ -10,9 +10,12 @@ set(LLVM_LINK_COMPONENTS if ("LLVMFrontendDriver" IN_LIST LLVM_AVAILABLE_LIBS) list(APPEND LLVM_LINK_COMPONENTS FrontendDriver) endif() -if ("LLVMOrcDebugging" IN_LIST LLVM_AVAILABLE_LIBS) - list(APPEND LLVM_LINK_COMPONENTS OrcDebugging) -endif() + +if (USE_REPL) + if ("LLVMOrcDebugging" IN_LIST LLVM_AVAILABLE_LIBS) + list(APPEND LLVM_LINK_COMPONENTS OrcDebugging) + endif() +if (USE_REPL) set(DLM DynamicLibraryManager.cpp