Skip to content

Commit

Permalink
configure: only append -fanalyzer when building with gcc
Browse files Browse the repository at this point in the history
Anaconda fails to build with clang as the compiler doesn't recognize -fanalyzer
introduced experimentally in #3482 for supplementing cppcheck. Only append that
when building with gcc instead.

Signed-off-by: jchzhou <zhoujiacheng@iscas.ac.cn>
  • Loading branch information
jchzhou committed Sep 19, 2024
1 parent 05d2978 commit de0a723
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ ANACONDA_PKG_CHECK_MODULES([RPM], [rpm >= 4.10.0])
ANACONDA_PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= 3.0.4])

# Add remaining compiler flags we want to use
CFLAGS="$CFLAGS -Wall -Werror -fanalyzer"
# only append -fanalyzer when building with gcc
CFLAGS="$CFLAGS -Wall -Werror"

if [[ "$CC" == "gcc" ]]; then
CFLAGS="$CFLAGS -fanalyzer"
fi


# Perform arch related tests
Expand Down

0 comments on commit de0a723

Please sign in to comment.