Skip to content

Commit

Permalink
ci: build with -Werror
Browse files Browse the repository at this point in the history
Suppress the outstanding -Wdeprecated-declarations warnings for now, so
we don't miss real issues in the future.
  • Loading branch information
mrc0mmand committed Nov 4, 2024
1 parent 473df4b commit e5e5417
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ set -eux
set -o pipefail

# TODO
# - enable --werror
# - currently there's a lot of warnings which need to be taken care of first
# - drop -Wno-deprecated-declarations
# - re-enable test-polkitbackendjsauthority
# - mocklibc overrides LD_PRELOAD, causing ASan to report false positives
# (with asan_verify_no_link=0)
Expand Down Expand Up @@ -40,9 +39,17 @@ case "$PHASE" in
)

for opt in "${BUILD_TEST_FLAGS[@]}"; do
COMPILER_FLAGS=(-Wno-deprecated-declarations)

if [[ "$opt" =~ --optimization=(3|s) ]]; then
COMPILER_FLAGS+=(-D_FORTIFY_SOURCE=2)
fi

meson setup build \
-Dman=true \
-Dcpp_args="-D_FORTIFY_SOURCE=2" \
--werror \
-Dc_args="${COMPILER_FLAGS[*]}" \
-Dcpp_args="${COMPILER_FLAGS[*]}" \
"${COMMON_BUILD_OPTS[@]}" \
"$opt"
meson compile -C build -v
Expand All @@ -55,6 +62,7 @@ case "$PHASE" in

meson setup build \
-Dman=true \
-Dc_args="-D_FORTIFY_SOURCE=2" \
-Dcpp_args="-D_FORTIFY_SOURCE=2" \
"${COMMON_BUILD_OPTS[@]}"

Expand Down

0 comments on commit e5e5417

Please sign in to comment.