From 404bcf259d45c264098279a50c66ee1204a487d3 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 14 Jun 2017 11:49:40 -0400 Subject: [PATCH] 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). --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc53fc083..860234b63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: addons: apt: 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 osx_image: xcode7.3 env: PYTHON=2.7 CPP=14 CLANG @@ -172,7 +172,7 @@ install: cd .. fi 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}" if [ "$CPP" = "-std=c++17" ]; then CPP="-std=c++1z"; fi fi