From 1f11ea2b651aa6627f90d5be2afa225d07f56089 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Wed, 13 Sep 2017 14:13:35 -0700 Subject: [PATCH] Make ccache work with Clang on Travis (#1097) This commit uses a workaround [0] to get ccache to work with Clang on Travis. [0] https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584 --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 56c1e3765..e543141c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,16 @@ addons: - libreadline-dev before_install: - eval "${MATRIX_EVAL}" + # Clang does not play nice with ccache (at least the versions offered by + # Travis), use a workaround: + # https://github.com/travis-ci/travis-ci/issues/5383#issuecomment-224630584 + - | + if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then + export CFLAGS="-Qunused-arguments" + export CXXFLAGS="-Qunused-arguments" + sudo ln -s $(which ccache) /usr/lib/ccache/clang + sudo ln -s $(which ccache) /usr/lib/ccache/clang++ + fi before_script: - export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 - export PATH=$PATH:$JAVA_HOME/bin -- 2.30.2