From 4c3d2af001d8f8b61104dc79960492ee2c446fce Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 19 Dec 2024 09:49:33 +0000 Subject: [PATCH] ci: Disable Werror on wrapped subprojects Enabling Werror on our code is good, but it's less good on external projects. Some of the Rust subprojects are now failing due to warnings exposed by the newer Rust toolchain in Fedora, which we don't care about. Signed-off-by: Daniel Stone Part-of: --- .gitlab-ci/meson/build.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index 03373ae8727..c0e546de08e 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -15,6 +15,13 @@ comma_separated() { echo "$*" } +no_werror() { + # shellcheck disable=SC2048 + for i in $*; do + echo "-D${i}:werror=false " + done +} + CROSS_FILE=/cross_file-"$CROSS".txt export PATH=$PATH:$PWD/.gitlab-ci/build @@ -132,9 +139,12 @@ else MAX_LD=${FDO_CI_CONCURRENT:-4} fi +# these are built as Meson subprojects; we want to use Meson's +# --force-fallback-for to ensure that we build the subprojects from their wrap +# files, and we also want to disable Werror on those, since we do not control +# these projects and making them warning-free is not our goal. # shellcheck disable=2206 -force_fallback_for=( - # FIXME: explain what these are needed for +meson_subprojects=( perfetto syn paste @@ -150,10 +160,12 @@ force_fallback_for=( section_switch meson-configure "meson: configure" rm -rf _build +# shellcheck disable=SC2046 meson setup _build \ --native-file=native.file \ --wrap-mode=nofallback \ - --force-fallback-for "$(comma_separated "${force_fallback_for[@]}")" \ + --force-fallback-for "$(comma_separated "${meson_subprojects[@]}")" \ + $(no_werror "${meson_subprojects[@]}") \ ${CROSS+--cross "$CROSS_FILE"} \ -D prefix=$PWD/install \ -D libdir=lib \