travis-ci: clang 4.0: install and use ldd-4.0

The clang 4.0/cpp17 build wasn't enabling -flto because the system
linker didn't like the output generated by clang for some reason.  This
switches the build to use llvm's lld instead, which lets -flto work
again (and links considerably faster, too).
This commit is contained in:
Jason Rhinelander 2017-06-14 11:49:40 -04:00
parent 2cc1916eaf
commit 404bcf259d

View File

@ -28,7 +28,7 @@ matrix:
addons: addons:
apt: apt:
sources: [deadsnakes, llvm-toolchain-trusty-4.0] sources: [deadsnakes, llvm-toolchain-trusty-4.0]
packages: [python3.6-dev python3.6-venv clang-4.0 llvm-4.0-dev] packages: [python3.6-dev python3.6-venv clang-4.0 llvm-4.0-dev, lld-4.0]
- os: osx - os: osx
osx_image: xcode7.3 osx_image: xcode7.3
env: PYTHON=2.7 CPP=14 CLANG env: PYTHON=2.7 CPP=14 CLANG
@ -172,7 +172,7 @@ install:
cd .. cd ..
fi fi
export CXXFLAGS="-isystem $HOME/.local/include/c++/v1 -stdlib=libc++" export CXXFLAGS="-isystem $HOME/.local/include/c++/v1 -stdlib=libc++"
export LDFLAGS="-L$HOME/.local/lib" export LDFLAGS="-L$HOME/.local/lib -fuse-ld=lld-$CLANG"
export LD_LIBRARY_PATH="$HOME/.local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$HOME/.local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
if [ "$CPP" = "-std=c++17" ]; then CPP="-std=c++1z"; fi if [ "$CPP" = "-std=c++17" ]; then CPP="-std=c++1z"; fi
fi fi