Skip to content

Commit

Permalink
github: build with "-fexceptions" CFLAGS
Browse files Browse the repository at this point in the history
This seems good for our test builds.

This can result in additional uninitialized variable warnings about
autovariables with cleanup attribute.

This flag is also enabled by default on Fedora package build ([1]).

[1] https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
  • Loading branch information
thom311 committed Nov 29, 2023
1 parent 30d6e63 commit a4718e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
set -x
export CC="${{ matrix.cc }}"
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11"
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions"
if [ "$CC" = "clang" ]; then
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
set -x
git clean -fdx
export CC="${{ matrix.cc }}"
export CFLAGS="-Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11"
export CFLAGS="-Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions"
if [ "$CC" = "clang" ]; then
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
fi
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
set -x
export CC="${{ matrix.cc }}"
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11"
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions"
if [ "$CC" = "clang" ]; then
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"
Expand Down

0 comments on commit a4718e6

Please sign in to comment.