travis: compile with -O1 with clang

libc in the Debian container got updated to 2.31, which in combination
with clang-9 triggers systemd/systemd#14865.

This has been fixed by https://reviews.llvm.org/D74712 which is (to my
knowledge) included in clang-10. To mitigate this without upgrading to
clang-10 we can compile with -O1 which works around it as well, see
https://bugzilla.redhat.com/show_bug.cgi?id=1803203.
This commit is contained in:
Frantisek Sumsal 2020-07-20 17:51:32 +02:00 committed by Yu Watanabe
parent d7d717b7e2
commit 2665327a41
1 changed files with 2 additions and 1 deletions

View File

@ -59,8 +59,9 @@ for phase in "${PHASES[@]}"; do
RUN|RUN_GCC|RUN_CLANG)
if [[ "$phase" = "RUN_CLANG" ]]; then
ENV_VARS="-e CC=clang -e CXX=clang++"
MESON_ARGS="--optimization=1"
fi
docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dsplit-usr=true -Dman=true build
docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dsplit-usr=true -Dman=true $MESON_ARGS build
$DOCKER_EXEC ninja -v -C build
docker exec -e "TRAVIS=$TRAVIS" -it $CONT_NAME ninja -C build test
;;