span-lite
span-lite copied to clipboard
enable travis to use IPO and add a test using libc++
I dont know anything about travis, hope this works correctly.
see #18
last commit for me today, if clang + libc++ still doesnt builds, then allow it as failure.
I think I get the importance of applying LTO to be better informed about software's correctness. Introducing it might take a considerable amount of time, as I want to know enough about it with respect to CMake, compilers and Travis to reach an easy-to-follow implementation.
I can build your tests with clang + LTO locally (with libc++ on top if d70b03c374485a6864aec157862088cae1f60c75 is applied), thats not the issue here. CMake has trouble picking up the matching C/C++ Compiler/Linker/Binutils, I think it has some holes in its automatic detection if suffixes and non-standard paths are involved (guess it never could figure out every possible installation)
ie look at the gcc-7 output:
CMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/g++-7
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7
CMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/gcc
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-4.8
with clang this is even more of a mess. likely you need to tell CMake the full paths to C/C++ compilers and tools (AR at least).
Not sure if this fixes your failures but when setting CXX you should also set CC. Suggested approach is to put MATRIX_EVAL="CXX=clang++-6 CC=clang-6" into the env section and then do eval "${MATRIX_EVAL}" in the script. (See the travis docu on C++)