From fe96110e1dfc56eeed4941e1f8f501576190879a Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sat, 25 Aug 2018 22:56:31 +0200 Subject: [PATCH] travis: install clang from apt (cherry picked from commit f432f5f1cc64ce4a025133d9c68cbdcd52562726) --- .travis.yml | 29 ++++++++++++++++------------- scripts/travis-common.sh | 9 +++++---- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34046e3fa..f5ae0bfea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,20 +31,32 @@ matrix: packages: [ 'libstdc++-6-dev', 'g++-6', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: linux name: Linux clang-3.9 - env: JOBS=8 CXX="ccache clang++-3.9 -Qunused-arguments" CC="clang-3.9" ENABLE_GLIBC_WORKAROUND=true TRIGGER=true + env: >- + JOBS=8 + CXX="ccache clang++-3.9 -Qunused-arguments" + CC="clang-3.9" + LINKFLAGS="-fuse-ld=gold-2.26" + ENABLE_GLIBC_WORKAROUND=true + TRIGGER=true addons: postgresql: "9.4" apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: [ 'libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] + packages: [ 'clang-3.9', 'libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: linux name: Linux clang-3.9 + coverage - env: JOBS=8 COVERAGE=true CXX="ccache clang++-3.9 -Qunused-arguments" CC="clang-3.9" + env: >- + JOBS=8 + COVERAGE=true + LLVM_COV="llvm-cov-3.9" + CXX="ccache clang++-3.9 -Qunused-arguments" + CC="clang-3.9" + LINKFLAGS="-fuse-ld=gold-2.26" addons: postgresql: "9.4" apt: sources: [ 'ubuntu-toolchain-r-test' ] - packages: ['libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] + packages: [ 'clang-3.9', 'llvm-3.9', 'libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: osx name: OSX clang # https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions @@ -75,15 +87,6 @@ install: before_script: - source bootstrap.sh - - | - if [[ $(uname -s) == 'Linux' ]]; then - mason install clang++ 3.9.1 - export PATH=$(mason prefix clang++ 3.9.1)/bin:${PATH} - mason install llvm-cov 3.9.1 - export PATH=$(mason prefix llvm-cov 3.9.1)/bin:${PATH} - which llvm-cov - export LLVM_COV="$(mason prefix llvm-cov 3.9.1)/bin/llvm-cov" - fi - ccache --version - ccache -p || true - ccache --show-stats || true diff --git a/scripts/travis-common.sh b/scripts/travis-common.sh index 8eaa23b5b..9a88eac92 100644 --- a/scripts/travis-common.sh +++ b/scripts/travis-common.sh @@ -77,10 +77,11 @@ config_override () { configure () { if enabled ${COVERAGE}; then - ./configure "$@" PREFIX=${PREFIX} PGSQL2SQLITE=False SVG2PNG=False SVG_RENDERER=False \ - COVERAGE=True DEBUG=True + ./configure "PREFIX=$PREFIX" "CUSTOM_LDFLAGS=$LINKFLAGS" "$@" \ + COVERAGE=True DEBUG=True \ + PGSQL2SQLITE=False SVG2PNG=False SVG_RENDERER=False else - ./configure "$@" PREFIX=${PREFIX} + ./configure "PREFIX=$PREFIX" "CUSTOM_LDFLAGS=$LINKFLAGS" "$@" fi # print final config values, sorted and indented sort -sk1,1 ./config.py | sed -e 's/^/ /' @@ -97,7 +98,7 @@ coverage () { -g "./.sconf_temp/**" \ -g "./scons/**" \ -g "./test/**" \ - -x "llvm-cov gcov >/dev/null 2>&1" + -x "${LLVM_COV:-llvm-cov} gcov >/dev/null 2>&1" } trigger_downstream() {