Skip to content

Commit 404bcf2

Browse files
committed
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).
1 parent 2cc1916 commit 404bcf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ matrix:
2828
addons:
2929
apt:
3030
sources: [deadsnakes, llvm-toolchain-trusty-4.0]
31-
packages: [python3.6-dev python3.6-venv clang-4.0 llvm-4.0-dev]
31+
packages: [python3.6-dev python3.6-venv clang-4.0 llvm-4.0-dev, lld-4.0]
3232
- os: osx
3333
osx_image: xcode7.3
3434
env: PYTHON=2.7 CPP=14 CLANG
@@ -172,7 +172,7 @@ install:
172172
cd ..
173173
fi
174174
export CXXFLAGS="-isystem $HOME/.local/include/c++/v1 -stdlib=libc++"
175-
export LDFLAGS="-L$HOME/.local/lib"
175+
export LDFLAGS="-L$HOME/.local/lib -fuse-ld=lld-$CLANG"
176176
export LD_LIBRARY_PATH="$HOME/.local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
177177
if [ "$CPP" = "-std=c++17" ]; then CPP="-std=c++1z"; fi
178178
fi

0 commit comments

Comments
 (0)