diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..e8a894a12 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,179 @@ +name: Cling CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + + include: + - name: ubuntu-16.04-gcc-4.8-compile + os: ubuntu-16.04 + compiler: gcc + version: "4.8" + + - name: ubuntu-16.04-gcc-5 + os: ubuntu-16.04 + compiler: gcc + version: "5" + + - name: ubuntu-16.04-gcc-6 + os: ubuntu-16.04 + compiler: gcc + version: "6" + + - name: ubuntu-16.04-gcc-7 + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-gcc-7-compile + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-gcc-7-notar + os: ubuntu-16.04 + compiler: gcc + version: "7" + + - name: ubuntu-16.04-clang-3.9 + os: ubuntu-16.04 + compiler: clang + version: "3.9" + + - name: ubuntu-16.04-clang-6 + os: ubuntu-16.04 + compiler: clang + version: "6.0" + + - name: ubuntu-16.04-clang-6-compile + os: ubuntu-16.04 + compiler: clang + version: "6.0" + + - name: ubuntu-18.04-gcc-7-notar + os: ubuntu-18.04 + compiler: gcc + version: "7" + + - name: ubuntu-18.04-gcc-7-compile + os: ubuntu-18.04 + compiler: gcc + version: "7" + + - name: ubuntu-18.04-clang-7-notar + os: ubuntu-18.04 + compiler: clang + version: "7" + + - name: macos-xcode-11.2.1 + os: macOS-latest + compiler: clang + xcode-version: "11.2.1" + + - name: macos-xcode-11.2.1-compile + os: macOS-latest + compiler: clang + xcode-version: "11.2.1" + + # - name: macos-xcode-11.2.1-notar + # os: macOS-latest + # compiler: clang + # xcode-version: "11.2.1" + + - name: macos-gcc-9-compile + os: macOS-latest + compiler: gcc + version: "9" + + - name: ubuntu-20.04-clang-7-compile + os: ubuntu-20.04 + compiler: clang + version: "7" + + - name: ubuntu-20.04-gcc-7-compile + os: ubuntu-20.04 + compiler: gcc + version: "7" + + - name: windows-2019-ninja + os: windows-2019 + generator: Ninja + + - name: windows-2019-visual-studio + os: windows-2019 + generator: Visual Studio 16 2019 + + steps: + - uses: actions/checkout@v2 + - name: Setup compiler on Linux + run: | + sudo apt-get update + if [ "${{ matrix.compiler }}" = "gcc" ]; then + sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }} + echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV + else + sudo apt-get install -y clang-${{ matrix.version }} + echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV + fi + if: runner.os == 'Linux' + shell: bash + - name: Setup compiler on OS X + run: | + curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install + if [ "${{ matrix.compiler }}" = "gcc" ]; then + brew install gcc@${{ matrix.version }} + echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV + echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV + else + sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app + echo "CC=clang" >> $GITHUB_ENV + echo "CXX=clang++" >> $GITHUB_ENV + fi + if: runner.os == 'macOS' + - name: Setup ninja for Windows + uses: seanmiddleditch/gha-setup-ninja@master + if: runner.os == 'Windows' && matrix.generator == 'Ninja' + - name: Execute cpt on Linux/OS X + run: | + if [[ "${{ matrix.compiler }}" = "gcc" && "${{ matrix.version }}" = "7" ]]; then + export CLING_BUILD_FLAGS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON" + if [ "${{ matrix.os }}" != "macOS-latest" ]; then + export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCXX_EXTENSIONS=OFF" + fi + fi + export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCLANG_ENABLE_ARCMT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_ENABLE_WARNINGS=OFF -DCLING_ENABLE_WARNINGS=ON" + if [[ ${{ matrix.name }} == *"compile"* ]]; then + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} + elif [[ ${{ matrix.name }} == *"notar"* ]]; then + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm + else + ./cpt.py -y --check-requirements --current-dev=tar --with-cmake-flags="$CLING_BUILD_FLAGS" --with-cling-url=https://github.com/$GITHUB_REPOSITORY --cling-branch=${{ github.head_ref }} --with-binary-llvm --with-llvm-tar + fi + working-directory: tools/packaging/ + if: runner.os != 'Windows' + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + SSH_PASS: ${{ secrets.SSH_PASS }} + - name: Execute cpt on Windows + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\vc\Auxiliary\build\vcvarsall.bat" x64 + C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe cpt.py --current-dev=tar --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -DCLING_BUILD_PLUGINS=Off -DCMAKE_C_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -DCMAKE_CXX_COMPILER=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64\cl.exe\" -G \"${{ matrix.generator}}\"" --with-cling-url=https://github.com/%GITHUB_REPOSITORY% --cling-branch=${{ github.head_ref }} --skip-cleanup + working-directory: tools\packaging\ + shell: cmd + if: runner.os == 'Windows' diff --git a/appveyor.yml b/appveyor.yml index 8e112ed64..ff6433f9e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,8 +53,7 @@ build_script: - tools\packaging\cpt.py ^ --current-dev=tar ^ --with-cling-url=https://github.com/%APPVEYOR_REPO_NAME% ^ - --with-clang-url=http://root.cern.ch/git/clang.git ^ - --with-llvm-url=http://root.cern.ch/git/llvm.git ^ + --cling-branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% ^ --with-cmake-flags="-DLLVM_OPTIMIZED_TABLEGEN=ON -G\"%CMAKE_GEN%\"" ^ --skip-cleanup diff --git a/test/Autoloading/AutoForwarding.C b/test/Autoloading/AutoForwarding.C index 428442329..523af0992 100644 --- a/test/Autoloading/AutoForwarding.C +++ b/test/Autoloading/AutoForwarding.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -I%S -Xclang -verify +// RUN: %cling -I%S -Xclang -verify < %s // XFAIL: vanilla-cling // Test FwdPrinterTest diff --git a/test/CodeGeneration/Statics.C b/test/CodeGeneration/Statics.C index 67b0ad82d..b7b44e2e9 100644 --- a/test/CodeGeneration/Statics.C +++ b/test/CodeGeneration/Statics.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s +// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s #include diff --git a/test/CodeUnloading/AtExit.C b/test/CodeUnloading/AtExit.C index cc391b166..4623562ca 100644 --- a/test/CodeUnloading/AtExit.C +++ b/test/CodeUnloading/AtExit.C @@ -6,8 +6,8 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s -// FIXME: cat %s | %cling -fsyntax-only -Xclang -verify 2>&1 +// RUN: %cling -Xclang -verify 2>&1 < %s | FileCheck %s +// FIXME: %cling -fsyntax-only -Xclang -verify 2>&1 < %s // Test to check functions registered via atexit are intercepted, and __dso_handle // is properly overridden in for child interpreters. diff --git a/test/Interfaces/evaluate.C b/test/Interfaces/evaluate.C index cbec8ea80..c579c7dcb 100644 --- a/test/Interfaces/evaluate.C +++ b/test/Interfaces/evaluate.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cling -Xclang -verify < %s | FileCheck %s #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/Value.h" diff --git a/test/Interfaces/transactionReuse.C b/test/Interfaces/transactionReuse.C index 7bfff760e..289a04483 100644 --- a/test/Interfaces/transactionReuse.C +++ b/test/Interfaces/transactionReuse.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %built_cling -fno-rtti < %s | FileCheck %s // This test makes sure the interpreter doesn't create many useless empty // transactions. diff --git a/test/Lookup/data.C b/test/Lookup/data.C index d7fd242c7..eae421ade 100644 --- a/test/Lookup/data.C +++ b/test/Lookup/data.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test lookupData .rawInput 1 diff --git a/test/Lookup/named.C b/test/Lookup/named.C index a647c28c3..73891a483 100644 --- a/test/Lookup/named.C +++ b/test/Lookup/named.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/scope.C b/test/Lookup/scope.C index 924b21924..dbc7c12bd 100644 --- a/test/Lookup/scope.C +++ b/test/Lookup/scope.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test findScope, which is essentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/Lookup/tag.C b/test/Lookup/tag.C index 3667f55f1..40492dea7 100644 --- a/test/Lookup/tag.C +++ b/test/Lookup/tag.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test Lookup::Named and Namespace, used in quick simple lookups. #include "cling/Interpreter/Interpreter.h" diff --git a/test/Lookup/template.C b/test/Lookup/template.C index 9d23dab81..3af81c242 100644 --- a/test/Lookup/template.C +++ b/test/Lookup/template.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti 2>&1 | FileCheck %s +// RUN: %built_cling -fno-rtti 2>&1 < %s | FileCheck %s // Test findClassTemplate, which is esentially is a DeclContext. #include "cling/Interpreter/Interpreter.h" #include "cling/Interpreter/LookupHelper.h" diff --git a/test/NullDeref/BinOp.C b/test/NullDeref/BinOp.C index 3785a1e18..71a3c4b12 100644 --- a/test/NullDeref/BinOp.C +++ b/test/NullDeref/BinOp.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0; diff --git a/test/NullDeref/Cast.C b/test/NullDeref/Cast.C index 7172e3e90..b57af91be 100644 --- a/test/NullDeref/Cast.C +++ b/test/NullDeref/Cast.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p = 0;; diff --git a/test/NullDeref/ExecutionTermination.C b/test/NullDeref/ExecutionTermination.C index 3eb993b8d..ae0c6dc24 100644 --- a/test/NullDeref/ExecutionTermination.C +++ b/test/NullDeref/ExecutionTermination.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks that the execution ends after a null prt dereference. diff --git a/test/NullDeref/InvalidMemoryAddress.C b/test/NullDeref/InvalidMemoryAddress.C index 9ece3ab0d..5f5421789 100644 --- a/test/NullDeref/InvalidMemoryAddress.C +++ b/test/NullDeref/InvalidMemoryAddress.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a dereference of an invalid memory address pointer.. int *p = (int*)0x1; diff --git a/test/NullDeref/Load.C b/test/NullDeref/Load.C index cc2c1a34b..2e650ec0f 100644 --- a/test/NullDeref/Load.C +++ b/test/NullDeref/Load.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 //This file checks a pointer load operation for null prt dereference. int *p; diff --git a/test/NullDeref/MethodCalls.C b/test/NullDeref/MethodCalls.C index 60a5ba380..3286a1ef7 100644 --- a/test/NullDeref/MethodCalls.C +++ b/test/NullDeref/MethodCalls.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 // This test verifies that we get nice warning if a method on null ptr object is // called. diff --git a/test/NullDeref/NonNullArg.C b/test/NullDeref/NonNullArg.C index a2bac16b5..60fc87516 100644 --- a/test/NullDeref/NonNullArg.C +++ b/test/NullDeref/NonNullArg.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify | FileCheck %s +// RUN: %cling -Xclang -verify < %s | FileCheck %s // XFAIL: powerpc64 //This file checks a call instruction. The called function has arguments with nonnull attribute. extern "C" int printf(const char* fmt, ...); diff --git a/test/NullDeref/NonNullArgCustom.C b/test/NullDeref/NonNullArgCustom.C index ad70fa5ec..9f0a4fd17 100644 --- a/test/NullDeref/NonNullArgCustom.C +++ b/test/NullDeref/NonNullArgCustom.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling -Xclang -verify +// RUN: %cling -Xclang -verify < %s // XFAIL: powerpc64 // We must be able to handle cases where, there is a custom function that has diff --git a/test/Plugins/Simple.C b/test/Plugins/Simple.C index f44cbc260..e3b1ea36b 100644 --- a/test/Plugins/Simple.C +++ b/test/Plugins/Simple.C @@ -1,4 +1,4 @@ -// RUN: cat %s | %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext | FileCheck %s +// RUN: %cling -fplugin=%cling_obj_root/tools/plugins/example/libclingDemoPlugin%shlibext < %s | FileCheck %s // CHECK:Action::ParseArgs // CHECK-NEXT:Action::CreateASTConsumer diff --git a/test/Prompt/ValuePrinter/Regression.C b/test/Prompt/ValuePrinter/Regression.C index 23543fc6a..d1513697e 100644 --- a/test/Prompt/ValuePrinter/Regression.C +++ b/test/Prompt/ValuePrinter/Regression.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %cling 2>&1 | FileCheck %s +// RUN: %cling 2>&1 < %s | FileCheck %s // This file should be used as regression test for the value printing subsystem // Reproducers of fixed bugs should be put here diff --git a/test/Prompt/ValuePrinter/Strings.C b/test/Prompt/ValuePrinter/Strings.C index ff2c0dc8d..2ff223a86 100644 --- a/test/Prompt/ValuePrinter/Strings.C +++ b/test/Prompt/ValuePrinter/Strings.C @@ -7,7 +7,7 @@ //------------------------------------------------------------------------------ // Windows wants -Wno-deprecated-declarations -//RUN: cat %s | %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 | FileCheck %s +//RUN: %cling -Wno-deprecated-declarations -Xclang -verify 2>&1 < %s | FileCheck %s #include #ifdef _WIN32 diff --git a/test/Utils/Transform.C b/test/Utils/Transform.C index 9701545ee..d7da28adb 100644 --- a/test/Utils/Transform.C +++ b/test/Utils/Transform.C @@ -6,7 +6,7 @@ // LICENSE.TXT for details. //------------------------------------------------------------------------------ -// RUN: cat %s | %built_cling -fno-rtti | FileCheck %s +// RUN: %built_cling -fno-rtti < %s | FileCheck %s // The test verifies the expected behavior in cling::utils::Transform class, // which is supposed to provide different transformation of AST nodes and types. diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 67881875f..d43658d5d 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -14,4 +14,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../lib/UserInterface/textinput add_subdirectory(demo) endif() -add_subdirectory(plugins) +if (LLVM_ENABLE_PLUGINS) + add_subdirectory(plugins) +endif() diff --git a/tools/packaging/cpt.py b/tools/packaging/cpt.py index 2143684f6..16f2e6c8a 100755 --- a/tools/packaging/cpt.py +++ b/tools/packaging/cpt.py @@ -212,18 +212,10 @@ def fetch_llvm(llvm_revision): return def checkout(): - if LLVM_BRANCH: - exec_subprocess_call('git checkout %s' % LLVM_BRANCH, srcdir) - else: - exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, srcdir) + exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, srcdir) def get_fresh_llvm(): - if LLVM_BRANCH: - exec_subprocess_call('git clone --depth=10 --branch %s %s %s' - % (LLVM_BRANCH, LLVM_GIT_URL, srcdir), workdir) - else: - exec_subprocess_call('git clone %s %s' % (LLVM_GIT_URL, srcdir), workdir) - + exec_subprocess_call('git clone %s %s' % (LLVM_GIT_URL, srcdir), workdir) checkout() def update_old_llvm(): @@ -232,13 +224,9 @@ def update_old_llvm(): # exec_subprocess_call('git clean -f -x -d', srcdir) checkout() - - if LLVM_BRANCH: - exec_subprocess_call('git pull origin %s' % LLVM_BRANCH, srcdir) - else: - exec_subprocess_call('git fetch --tags', srcdir) - exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' - % llvm_revision, srcdir) + exec_subprocess_call('git fetch --tags', srcdir) + exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' + % llvm_revision, srcdir) if os.path.isdir(srcdir): update_old_llvm() @@ -346,18 +334,10 @@ def fetch_clang(llvm_revision): global clangdir clangdir = os.path.join(dir, 'clang') def checkout(): - if CLANG_BRANCH: - exec_subprocess_call('git checkout %s' % CLANG_BRANCH, clangdir) - else: - exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, clangdir) + exec_subprocess_call('git checkout cling-patches-r%s' % llvm_revision, clangdir) def get_fresh_clang(): - if CLANG_BRANCH: - exec_subprocess_call('git clone --depth=10 --branch %s %s' - % (CLANG_BRANCH, CLANG_GIT_URL), dir) - else: - exec_subprocess_call('git clone %s' % CLANG_GIT_URL, dir) - + exec_subprocess_call('git clone %s' % CLANG_GIT_URL, dir) checkout() def update_old_clang(): @@ -368,12 +348,9 @@ def update_old_clang(): exec_subprocess_call('git fetch --tags', clangdir) checkout() - if CLANG_BRANCH: - exec_subprocess_call('git pull origin %s' % CLANG_BRANCH, clangdir) - else: - exec_subprocess_call('git fetch --tags', clangdir) - exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' % llvm_revision, - clangdir) + exec_subprocess_call('git fetch --tags', clangdir) + exec_subprocess_call('git pull origin refs/tags/cling-patches-r%s' % llvm_revision, + clangdir) if os.path.isdir(clangdir): update_old_clang() @@ -582,9 +559,8 @@ def compile(arg): build.make('clang cling' if CLING_BRANCH else 'cling') - if not CLING_BRANCH: - box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) - build.make('install') + box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) + build.make('install') if TRAVIS_BUILD_DIR: ### Run cling once, dumping the include paths, helps debug issues @@ -622,9 +598,8 @@ def compile_for_binary(arg): box_draw('Building %s (using %d cores)' % ("cling", multiprocessing.cpu_count())) exec_subprocess_call('make -j%d %s' % (multiprocessing.cpu_count(), "cling"), LLVM_OBJ_ROOT) - if not CLING_BRANCH: - box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) - build.make('install') + box_draw("Install compiled binaries to prefix (using %d cores)" % build.cores) + build.make('install') if TRAVIS_BUILD_DIR: ### Run cling once, dumping the include paths, helps debug issues @@ -1886,6 +1861,7 @@ def make_dmg(): default='http://root.cern.ch/git/clang.git') parser.add_argument('--with-cling-url', action='store', help='Specify an alternate URL of Cling repo', default='https://github.com/root-project/cling.git') +parser.add_argument('--cling-branch', help='Specify a particular Cling branch') parser.add_argument('--with-binary-llvm', help='Download LLVM binary and use it to build Cling in dev mode', action='store_true') parser.add_argument('--with-llvm-tar', help='Download and use LLVM binary release tar to build Cling for debugging', action='store_true') @@ -2043,13 +2019,9 @@ def custom_input(prompt, always_yes=False): parser.print_help() raise SystemExit -CLING_BRANCH = CLANG_BRANCH = LLVM_BRANCH = None -if args['current_dev']: - cDev = args['current_dev'] - if cDev.startswith('branch:'): - CLING_BRANCH = CLANG_BRANCH = LLVM_BRANCH = cDev[7:] - elif cDev.startswith('branches:'): - CLING_BRANCH, CLANG_BRANCH, LLVM_BRANCH = cDev[9:].split(',') +CLING_BRANCH = None +if args['current_dev'] and args['cling_branch']: + CLING_BRANCH = args['cling_branch'] print('Cling Packaging Tool (CPT)') print('Arguments vector: ' + str(sys.argv)) @@ -2344,13 +2316,6 @@ def custom_input(prompt, always_yes=False): make_dmg() cleanup() - elif args['current_dev'].startswith('branch'): - compile(os.path.join(workdir, 'cling-' + VERSION.replace('-' + REVISION[:7], ''))) - #install_prefix() - if not args['no_test']: - test_cling() - cleanup() - elif args['current_dev'] == 'pkg': compile(os.path.join(workdir, 'cling-' + DIST + '-' + REV + '-' + platform.machine().lower() + '-' + VERSION)) install_prefix()