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 <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
This commit is contained in:
Daniel Stone
2024-12-19 09:49:33 +00:00
committed by Marge Bot
parent 87809f6236
commit 4c3d2af001

View File

@@ -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 \