Skip to content

Commit

Permalink
Add option in configure for fast build
Browse files Browse the repository at this point in the history
Maintainer-level only, hence no helpstring
  • Loading branch information
albinahlback committed Jul 18, 2024
1 parent 949357f commit bd110e3
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ yes|no)
esac],
enable_avx512="no")

# Note: This is maintainer level only. Currently only used for Nemo CI.
# NOTE: This is maintainer level only. Currently only used for Nemo CI.
AC_ARG_ENABLE(mpfr-check,[],
[case $enableval in
yes|no)
Expand All @@ -319,6 +319,18 @@ yes|no)
esac],
enable_mpfr_check="yes")

# NOTE: Maintainer level only. Avoids any sort of optimization to speed up
# builds.
AC_ARG_ENABLE(fast-build,[],
[case $enableval in
yes|no)
;;
*)
AC_MSG_ERROR([Bad value $enableval for --enable-fast-build. Need yes or no.])
;;
esac],
enable_fast_build="no")

################################################################################
# packages
################################################################################
Expand Down Expand Up @@ -518,7 +530,11 @@ fi
# architecture specifics
################################################################################

gcc_cflags="-O3 -pedantic -std=c11"
if test "$enable_fast_build" = "no";
then
gcc_cflags="-O3 "
fi
gcc_cflags="$gcc_cflags-pedantic -std=c11"
gcc_warnings="-Werror=implicit-function-declaration -Wall -Wno-stringop-overread -Wno-stringop-overflow -Wno-maybe-uninitialized"

dnl We only try to provide specifics for those systems that currently supports
Expand Down Expand Up @@ -1246,7 +1262,10 @@ then
fi
done
done
AX_CHECK_COMPILE_FLAG([-funroll-loops],[unroll_loops="yes"])
if test "$enable_fast_build" = no;
then
AX_CHECK_COMPILE_FLAG([-funroll-loops],[unroll_loops="yes"])
fi
if test "$unroll_loops" = "yes";
then
AC_SUBST(UNROLL_LOOPS,1)
Expand Down

0 comments on commit bd110e3

Please sign in to comment.