mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Temporary gcc travis-ci build fixes
Recent gcc snapshots (both gcc 7 snapshots and recent gcc 6 stable branch snapshots) are triggering an upstream gcc bug when -flto is enabled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79296). This has been hitting the gcc-7 builds for a while now, but is going to start hitting the debian testing builds in a few days as well. The issue is triggered by using -flto in combination with structs or classes declared in a function, as done in test_alias_initialization, test_isses, test_methods_and_attributes (and possibly more). I'm subscribed to the upstream bug, and will submit another PR to reenable LTO once a fixed gcc is available. The gcc-7 build also generates some warnings; just ignore them for now (by turning off -Werror).
This commit is contained in:
parent
c137c0a87b
commit
ada763b9ee
@ -96,13 +96,18 @@ before_install:
|
||||
fi
|
||||
if [ -n "$DOCKER" ]; then
|
||||
docker pull $DOCKER
|
||||
# Disable LTO with gcc until gcc 79296 is fixed:
|
||||
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DPYBIND11_LTO_CXX_FLAGS="
|
||||
export containerid=$(docker run --detach --tty \
|
||||
--volume="$PWD":/pybind11 --workdir=/pybind11 \
|
||||
--env="CXXFLAGS=$CXXFLAGS" \
|
||||
--env="CC=$CC" --env="CXX=$CXX" --env="DEBIAN_FRONTEND=$DEBIAN_FRONTEND" \
|
||||
--env=GCC_COLORS=\ \
|
||||
$DOCKER)
|
||||
docker exec --tty "$containerid" sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
|
||||
export SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
|
||||
# gcc-7 currently generates warnings; some are upstream bugs, so just turn off -Werror for now
|
||||
if [ "$GCC" = "7" ]; then WERROR=off; fi
|
||||
else
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
pip install --user --upgrade pip virtualenv
|
||||
@ -138,7 +143,7 @@ script:
|
||||
- $SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS}
|
||||
-DPYBIND11_PYTHON_VERSION=$PYTHON
|
||||
-DPYBIND11_CPP_STANDARD=$CPP
|
||||
-DPYBIND11_WERROR=ON
|
||||
-DPYBIND11_WERROR=${WERROR:-ON}
|
||||
- $SCRIPT_RUN_PREFIX make pytest -j 2
|
||||
- $SCRIPT_RUN_PREFIX make test_cmake_build
|
||||
after_failure: cat tests/test_cmake_build/*.log
|
||||
|
Loading…
Reference in New Issue
Block a user