]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ci: don't combine -Werror and -fsanitize
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 09:19:24 +0000 (11:19 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 18:35:43 +0000 (20:35 +0200)
As explained in [0]:

    Note that sanitizers tend to increase the rate of false positive
    warnings, most notably those around -Wmaybe-uninitialized. We recommend
    against combining -Werror and [the use of] sanitizers.

[0] https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Instrumentation-Options.html#index-fsanitize_003dundefined

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
.github/workflows/cibuild.sh

index 6bb10862f4b95a0744be3000c7ea6e667fda9125..dfcf91c757bd62bae36ac03d060dd6f132779eb7 100755 (executable)
@@ -83,7 +83,6 @@ for phase in "${PHASES[@]}"; do
             --disable-use-tty-group
             --disable-makeinstall-chown
             --enable-all-programs
-            --enable-werror
         )
 
         if [[ "$COVERAGE" == "yes" ]]; then
@@ -94,6 +93,8 @@ for phase in "${PHASES[@]}"; do
             opts+=(--enable-asan --enable-ubsan)
             CFLAGS+=(-fno-omit-frame-pointer)
             CXXFLAGS+=(-fno-omit-frame-pointer)
+        else
+            opts+=(--enable-werror)
         fi
 
         if [[ "$COMPILER" == clang* && "$SANITIZE" == "yes" ]]; then