Enables LTO for Travis Release Builds#3770
Conversation
.travis.yml
Outdated
| sources: ['ubuntu-toolchain-r-test'] | ||
| packages: ['libstdc++-5-dev'] | ||
| env: CLANG_VERSION='3.9.1' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON | ||
| env: CLANG_VERSION='3.9.1' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON ENABLE_LTO=ON |
There was a problem hiding this comment.
Would omit this one, I don't think need we need this for the sanitzer build.
There was a problem hiding this comment.
Hm having the same build setup sanitizes that we're using for releases would be nice though - without lto things like undefined behavior due to e.g. ODR violations can behave differently. I don't have a strong opinion here, though. Removed it for now.
|
Urgh I've just seen the Clang error with LTO builds on Travis
|
|
@daniel-j-h weird, we are using clang 3.9.1 in node-osrm as well and we use it to compile |
|
Hm no, we are using the exact same Clang version in node-osrm: The failing build is Mason+Clang3.9.1+LTO specifically. I can try to reproduce locally. |
|
/cc @springmeyer You might have some experience with clang 3.9 vs. LTO linking here? Anything that we do in node-osrm that we don't here? |
|
Thanks for the ping. I recall that clang 3.9.0 and binutils 2.27 had a bad interaction that was fixed in clang 3.9.1: #3389 (comment). The fact that this is happening now with 3.9.1 is curious. I'll attempt to replicate later today and see if I see any clues. |
|
I just spawned up a local Trusty Docker container, replicating the build environment with binutils, clang and really all deps. from Mason - except for zlib and libstdc++ (from ubuntu toolchain ppa, as we do on Travis). But I can not replicate the segfault. What I tried is clearing the Travis caches primarily for ccache and restarting the build. |
|
It works with Clang 4.0. Argh. At least we are unblocked by it now. @springmeyer as soon as we merge this PR we depend on Clang 4.0 for all our production builds. Can you make sure to bundle a recent Clang 4.0 RC and once the release is out (should be a matter of days) bundle this. |
|
Blocked by having LLVM 4 in Mason mapbox/mason#385 |
llvm 4.0 packages are now available via mason. This includes separate packages:
|
LTO builds for Travis release jobs. Let's wait for Travis and see how it goes.